linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/msm/dpu: fix wrong return value in dpu_encoder_init()
@ 2020-07-01  4:11 Tianjia Zhang
  0 siblings, 0 replies; 4+ messages in thread
From: Tianjia Zhang @ 2020-07-01  4:11 UTC (permalink / raw)
  To: robdclark, sean, airlied, daniel, ddavenport, zhengbin13, sam, kalyan_t
  Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, tianjia.zhang

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 <tianjia.zhang@linux.alibaba.com>
---
 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


^ permalink raw reply related	[flat|nested] 4+ messages in thread
* Re: [PATCH] drm/msm/dpu: fix wrong return value in dpu_encoder_init()
@ 2020-07-02 14:04 Markus Elfring
  2020-07-03  4:19 ` Tianjia Zhang
  0 siblings, 1 reply; 4+ messages in thread
From: Markus Elfring @ 2020-07-02 14:04 UTC (permalink / raw)
  To: Tianjia Zhang, dri-devel, freedreno, linux-arm-msm
  Cc: linux-kernel, Chen Tao, Daniel Vetter, David Airlie,
	Drew Davenport, Kalyan Thota, Rob Clark, Sam Ravnborg, Sean Paul,
	zhengbin

> 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/20200618062803.152097-1-chentao107@huawei.com/
https://lore.kernel.org/patchwork/patch/1257957/
https://lkml.org/lkml/2020/6/18/46

Regards,
Markus

^ permalink raw reply	[flat|nested] 4+ messages in thread
* Re: [PATCH] drm/msm/dpu: fix wrong return value in dpu_encoder_init()
@ 2020-07-02 14:04 Markus Elfring
  0 siblings, 0 replies; 4+ messages in thread
From: Markus Elfring @ 2020-07-02 14:04 UTC (permalink / raw)
  To: Tianjia Zhang, dri-devel, freedreno, linux-arm-msm
  Cc: linux-kernel, Chen Tao, Daniel Vetter, David Airlie,
	Drew Davenport, Kalyan Thota, Rob Clark, Sam Ravnborg, Sean Paul,
	zhengbin

> 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/20200618062803.152097-1-chentao107@huawei.com/
https://lore.kernel.org/patchwork/patch/1257957/
https://lkml.org/lkml/2020/6/18/46

Regards,
Markus

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-07-03  4:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-01  4:11 [PATCH] drm/msm/dpu: fix wrong return value in dpu_encoder_init() Tianjia Zhang
2020-07-02 14:04 Markus Elfring
2020-07-03  4:19 ` Tianjia Zhang
2020-07-02 14:04 Markus Elfring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).