Message ID | 1522217893-2199-1-git-send-email-ryadav@codeaurora.org (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
On Wed, Mar 28, 2018 at 11:48:13AM +0530, Rajesh Yadav wrote: > 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. > > Signed-off-by: Rajesh Yadav <ryadav@codeaurora.org> Reviewed-by: Sean Paul <seanpaul@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 8ef75f5..531efa9 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c > @@ -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; > -- > The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, > a Linux Foundation Collaborative Project >
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c index 8ef75f5..531efa9 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c @@ -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;
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. Signed-off-by: Rajesh Yadav <ryadav@codeaurora.org> --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)