2023-07-10 04:11:02

by 李扬韬

[permalink] [raw]
Subject: [PATCH v2 13/19] drm/tegra: dpaux: Fix incorrect return value of platform_get_irq

When platform_get_irq fails, we should return dpaux->irq
instead of -ENXIO.

Fixes: 6b6b604215c6 ("drm/tegra: Add eDP support")
Signed-off-by: Yangtao Li <[email protected]>
---
drivers/gpu/drm/tegra/dpaux.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/tegra/dpaux.c b/drivers/gpu/drm/tegra/dpaux.c
index 4699def04190..f120897ce4b3 100644
--- a/drivers/gpu/drm/tegra/dpaux.c
+++ b/drivers/gpu/drm/tegra/dpaux.c
@@ -466,7 +466,7 @@ static int tegra_dpaux_probe(struct platform_device *pdev)

dpaux->irq = platform_get_irq(pdev, 0);
if (dpaux->irq < 0)
- return -ENXIO;
+ return dpaux->irq;

if (!pdev->dev.pm_domain) {
dpaux->rst = devm_reset_control_get(&pdev->dev, "dpaux");
--
2.39.0