Skip to contentSkip to conversation

drm/msm: Fix return type mismatch for dpu_kms_init

PATCH In review Rajesh Yadav 2 participants 2 messages Mar 28, 2018 – Apr 4, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 2/3 drm/msm: Fix return type mismatch for dpu_kms_init

dpu_kms_init returns pointer to struct msm_kms but incase of platform_get_irq() failure, int was returned. Fix the return type to avoid compilation error.

---
 drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c +1 -1
index 8ef75f5..531efa9 100644
@@ -2027,7 +2027,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;
Signature · 7 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

_______________________________________________
Freedreno mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/freedreno
Reviewed-by on v1 2/3
#1 lore raw
Quoted 5 lines · Rajesh Yadav

dpu_kms_init returns pointer to struct msm_kms but incase of platform_get_irq() failure, int was returned. Fix the return type to avoid compilation error.

Quoted 21 lines
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c +1 -1
index 8ef75f5..531efa9 100644
@@ -2027,7 +2027,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;
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
Signature · 5 lines
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel