mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-01 08:04:22 +08:00
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: 4d34c9267d
: ("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>
This commit is contained in:
parent
b72845ee55
commit
1199fa8c0d
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user