aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2019-04-24 12:09:54 +0200
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2019-04-24 13:12:33 +0200
commit36e3425f9d53697ffbc13328dc8a6076f62efd9b (patch)
treec33f15c9b32ac995b0bded260678695633812c7d
parente824b3ac2a487eb623fe98eb96492e1b4650b836 (diff)
tegra-cec: fix cec_notifier_parse_hdmi_phandle return checkbr-v5.2g2
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 <hverkuil-cisco@xs4all.nl> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
-rw-r--r--drivers/media/platform/tegra-cec/tegra_cec.c4
1 files changed, 2 insertions, 2 deletions
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);

Privacy Policy