[PATCH] drm/msm/dp: Fix platform_get_irq() check
Dan Carpenter
dan.carpenter at linaro.org
Wed Dec 6 12:02:05 UTC 2023
The platform_get_irq() function returns negative error codes. It never
returns zero. Fix the check accordingly.
Fixes: 82c2a5751227 ("drm/msm/dp: tie dp_display_irq_handler() with dp driver")
Signed-off-by: Dan Carpenter <dan.carpenter at linaro.org>
---
drivers/gpu/drm/msm/dp/dp_display.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c
index 61b7103498a7..d80cb3d14c6b 100644
--- a/drivers/gpu/drm/msm/dp/dp_display.c
+++ b/drivers/gpu/drm/msm/dp/dp_display.c
@@ -1166,9 +1166,9 @@ static int dp_display_request_irq(struct dp_display_private *dp)
struct platform_device *pdev = dp->dp_display.pdev;
dp->irq = platform_get_irq(pdev, 0);
- if (!dp->irq) {
+ if (dp->irq < 0) {
DRM_ERROR("failed to get irq\n");
- return -EINVAL;
+ return dp->irq;
}
rc = devm_request_irq(&pdev->dev, dp->irq, dp_display_irq_handler,
--
2.42.0
More information about the dri-devel
mailing list