From: Hans Verkuil Date: Wed, 24 Apr 2019 10:09:54 +0000 (-0400) Subject: media: tegra-cec: fix cec_notifier_parse_hdmi_phandle return check X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=1199fa8c0ddd34dae6d72b653b27dfb3554e9b57;p=openwrt%2Fstaging%2Fblogic.git media: tegra-cec: fix cec_notifier_parse_hdmi_phandle return check cec_notifier_parse_hdmi_phandle returns an error pointer, not a NULL pointer on error. Fixes: 4d34c9267db7: ("media: tegra_cec: use new cec_notifier_parse_hdmi_phandle helper") Signed-off-by: Hans Verkuil Reported-by: Dan Carpenter Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/platform/tegra-cec/tegra_cec.c b/drivers/media/platform/tegra-cec/tegra_cec.c index 7fb3a4fa07c1..447bdfbe5afe 100644 --- a/drivers/media/platform/tegra-cec/tegra_cec.c +++ b/drivers/media/platform/tegra-cec/tegra_cec.c @@ -334,8 +334,8 @@ static int tegra_cec_probe(struct platform_device *pdev) hdmi_dev = cec_notifier_parse_hdmi_phandle(&pdev->dev); - if (!hdmi_dev) - return -ENODEV; + if (IS_ERR(hdmi_dev)) + return PTR_ERR(hdmi_dev); cec = devm_kzalloc(&pdev->dev, sizeof(struct tegra_cec), GFP_KERNEL);