[Freedreno] [DPU PATCH 2/3] drm/msm: Properly cast return with ERR_PTR

Sean Paul seanpaul at chromium.org
Mon Apr 2 20:10:23 UTC 2018


Return value is an error pointer, not an int.

Fixes: 758128c1eda4 drm/msm: Populate kms->irq for dpu
Signed-off-by: Sean Paul <seanpaul at chromium.org>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
index 74afa1a5eb7d..36657aa97bd7 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
@@ -2029,7 +2029,7 @@ struct msm_kms *dpu_kms_init(struct drm_device *dev)
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0) {
 		DPU_ERROR("failed to get irq: %d\n", irq);
-		return irq;
+		return ERR_PTR(irq);
 	}
 
 	priv = dev->dev_private;
-- 
Sean Paul, Software Engineer, Google / Chromium OS



More information about the Freedreno mailing list