summaryrefslogtreecommitdiffstats
path: root/drivers/media/cec
diff options
context:
space:
mode:
authorRuan Jinjie <ruanjinjie@huawei.com>2023-08-01 15:52:53 +0200
committerMauro Carvalho Chehab <mchehab@kernel.org>2023-08-10 07:58:36 +0200
commit74a5a66fb422759961d78a7751a1f0b6b06b80f6 (patch)
tree1a447313fb5211888ed8dfafbd02ac87e5823c8c /drivers/media/cec
parentmedia: cx23885: debug cosmetics (diff)
downloadlinux-74a5a66fb422759961d78a7751a1f0b6b06b80f6.tar.xz
linux-74a5a66fb422759961d78a7751a1f0b6b06b80f6.zip
media: tegra_cec: fix the return value handle for platform_get_irq()
There is no possible for platform_get_irq() to return 0, and the return value of platform_get_irq() is more sensible to show the error reason. Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'drivers/media/cec')
-rw-r--r--drivers/media/cec/platform/tegra/tegra_cec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/cec/platform/tegra/tegra_cec.c b/drivers/media/cec/platform/tegra/tegra_cec.c
index 699c3819f3b2..7c1022cee1e8 100644
--- a/drivers/media/cec/platform/tegra/tegra_cec.c
+++ b/drivers/media/cec/platform/tegra/tegra_cec.c
@@ -348,8 +348,8 @@ static int tegra_cec_probe(struct platform_device *pdev)
cec->tegra_cec_irq = platform_get_irq(pdev, 0);
- if (cec->tegra_cec_irq <= 0)
- return -EBUSY;
+ if (cec->tegra_cec_irq < 0)
+ return cec->tegra_cec_irq;
cec->cec_base = devm_ioremap(&pdev->dev, res->start,
resource_size(res));