Commit c4ac0c6c authored by Dan Carpenter's avatar Dan Carpenter Committed by Dmitry Baryshkov

drm/msm/dp: Fix platform_get_irq() check

The platform_get_irq() function returns negative error codes.  It never
returns zero.  Fix the check accordingly.

Fixes: 82c2a575 ("drm/msm/dp: tie dp_display_irq_handler() with dp driver")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/570755/
Link: https://lore.kernel.org/r/c12bb69b-d676-4345-9712-48aab48f2b48@moroto.mountainSigned-off-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
parent 1b2d98bd
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment