mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 00:22:00 +02:00
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: 82c2a57512 ("drm/msm/dp: tie dp_display_irq_handler() with dp driver")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/570755/
Link: https://lore.kernel.org/r/c12bb69b-d676-4345-9712-48aab48f2b48@moroto.mountain
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
This commit is contained in:
parent
1b2d98bdd7
commit
c4ac0c6c96
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user