2020-07-01 04:12:46

by Tianjia Zhang

[permalink] [raw]
Subject: [PATCH] drm/msm/dpu: fix wrong return value in dpu_encoder_init()

A positive value ENOMEM is returned here. I thinr this is a typo error.
It is necessary to return a negative error value.

Signed-off-by: Tianjia Zhang <[email protected]>
---
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
index 63976dcd2ac8..119c89659e71 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
@@ -2183,7 +2183,7 @@ struct drm_encoder *dpu_encoder_init(struct drm_device *dev,

dpu_enc = devm_kzalloc(dev->dev, sizeof(*dpu_enc), GFP_KERNEL);
if (!dpu_enc)
- return ERR_PTR(ENOMEM);
+ return ERR_PTR(-ENOMEM);

rc = drm_encoder_init(dev, &dpu_enc->base, &dpu_encoder_funcs,
drm_enc_mode, NULL);
--
2.17.1


2020-07-02 14:06:15

by Markus Elfring

[permalink] [raw]
Subject: Re: [PATCH] drm/msm/dpu: fix wrong return value in dpu_encoder_init()

> A positive value ENOMEM is returned here. I thinr this is a typo error.
> It is necessary to return a negative error value.

I imagine that a small adjustment could be nice for this change description.

How do you think about to follow progress for the integration of
a previous patch like “[RESEND] drm/msm/dpu: fix error return code in dpu_encoder_init”?
https://lore.kernel.org/dri-devel/[email protected]/
https://lore.kernel.org/patchwork/patch/1257957/
https://lkml.org/lkml/2020/6/18/46

Regards,
Markus

2020-07-02 14:07:28

by Markus Elfring

[permalink] [raw]
Subject: Re: [PATCH] drm/msm/dpu: fix wrong return value in dpu_encoder_init()

> A positive value ENOMEM is returned here. I thinr this is a typo error.
> It is necessary to return a negative error value.

I imagine that a small adjustment could be nice for this change description.

How do you think about to follow progress for the integration of
a previous patch like “[RESEND] drm/msm/dpu: fix error return code in dpu_encoder_init”?
https://lore.kernel.org/dri-devel/[email protected]/
https://lore.kernel.org/patchwork/patch/1257957/
https://lkml.org/lkml/2020/6/18/46

Regards,
Markus

2020-07-03 04:21:22

by Tianjia Zhang

[permalink] [raw]
Subject: Re: [PATCH] drm/msm/dpu: fix wrong return value in dpu_encoder_init()



On 2020/7/2 22:04, Markus Elfring wrote:
>> A positive value ENOMEM is returned here. I thinr this is a typo error.
>> It is necessary to return a negative error value.
>
> I imagine that a small adjustment could be nice for this change description.
>
> How do you think about to follow progress for the integration of
> a previous patch like “[RESEND] drm/msm/dpu: fix error return code in dpu_encoder_init”?
> https://lore.kernel.org/dri-devel/[email protected]/
> https://lore.kernel.org/patchwork/patch/1257957/
> https://lkml.org/lkml/2020/6/18/46
>
> Regards,
> Markus
>

This is the same fix, please ignore this patch.

Thanks,
Tianjia