Skip to content

Commit 1199fa8

Browse files
Hans Verkuilmchehab
authored andcommitted
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: 4d34c92: ("media: tegra_cec: use new cec_notifier_parse_hdmi_phandle helper") Signed-off-by: Hans Verkuil <[email protected]> Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent b72845e commit 1199fa8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/media/platform/tegra-cec/tegra_cec.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,8 @@ static int tegra_cec_probe(struct platform_device *pdev)
334334

335335
hdmi_dev = cec_notifier_parse_hdmi_phandle(&pdev->dev);
336336

337-
if (!hdmi_dev)
338-
return -ENODEV;
337+
if (IS_ERR(hdmi_dev))
338+
return PTR_ERR(hdmi_dev);
339339

340340
cec = devm_kzalloc(&pdev->dev, sizeof(struct tegra_cec), GFP_KERNEL);
341341

0 commit comments

Comments
 (0)