diff options
author | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2019-04-24 06:09:54 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-05-08 14:02:45 -0400 |
commit | 1199fa8c0ddd34dae6d72b653b27dfb3554e9b57 (patch) | |
tree | 71d43ebb8abb1d68feca39fe6a49ba6aba40c791 /drivers/media/platform/tegra-cec | |
parent | b72845ee5577b227131b1fef23f9d9a296621d7b (diff) | |
download | linux-1199fa8c0ddd34dae6d72b653b27dfb3554e9b57.tar.gz |
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 <hverkuil-cisco@xs4all.nl>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/platform/tegra-cec')
-rw-r--r-- | drivers/media/platform/tegra-cec/tegra_cec.c | 4 |
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); |