]> Git Repo - linux.git/commitdiff
drm/msm/dp: Fix platform_get_irq() check
authorDan Carpenter <[email protected]>
Wed, 6 Dec 2023 12:02:05 +0000 (15:02 +0300)
committerDmitry Baryshkov <[email protected]>
Fri, 8 Dec 2023 01:11:47 +0000 (04:11 +0300)
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 <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/570755/
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
drivers/gpu/drm/msm/dp/dp_display.c

index fd4e62fe163fd968381d042a0cde6a55bbe73747..f8a9e8403c264476da2bb30de7cc6ec1e0057da4 100644 (file)
@@ -1168,9 +1168,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,
This page took 0.060006 seconds and 4 git commands to generate.