dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] drm/msm/dsi: fix error return code in msm_dsi_host_init()
@ 2017-02-09 15:19 Wei Yongjun
       [not found] ` <20170209151907.28800-1-weiyj.lk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2017-02-09 15:19 UTC (permalink / raw)
  To: Rob Clark, David Airlie, Archit Taneja, Hai Li, Rob Herring
  Cc: linux-arm-msm-u79uwXL29TY76Z2rM5mHXA,
	freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Wei Yongjun,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

From: Wei Yongjun <weiyongjun1@huawei.com>

Fix to return error code -ENOMEM from the malloc error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/gpu/drm/msm/dsi/dsi_host.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
index 1fc07ce..4f79b10 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_host.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
@@ -1740,6 +1740,7 @@ int msm_dsi_host_init(struct msm_dsi *msm_dsi)
 
 	msm_host->rx_buf = devm_kzalloc(&pdev->dev, SZ_4K, GFP_KERNEL);
 	if (!msm_host->rx_buf) {
+		ret = -ENOMEM;
 		pr_err("%s: alloc rx temp buf failed\n", __func__);
 		goto fail;
 	}

_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno

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

* Re: [PATCH -next] drm/msm/dsi: fix error return code in msm_dsi_host_init()
       [not found] ` <20170209151907.28800-1-weiyj.lk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2017-02-14 20:14   ` Daniel Vetter
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Vetter @ 2017-02-14 20:14 UTC (permalink / raw)
  To: Wei Yongjun
  Cc: Rob Herring, Archit Taneja, David Airlie,
	linux-arm-msm-u79uwXL29TY76Z2rM5mHXA,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Rob Clark,
	Wei Yongjun, freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Hai Li

On Thu, Feb 09, 2017 at 03:19:07PM +0000, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
> 
> Fix to return error code -ENOMEM from the malloc error handling
> case instead of 0, as done elsewhere in this function.
> 
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Applied for 4.12 to drm-misc-next, thanks.
-Daniel

> ---
>  drivers/gpu/drm/msm/dsi/dsi_host.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
> index 1fc07ce..4f79b10 100644
> --- a/drivers/gpu/drm/msm/dsi/dsi_host.c
> +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
> @@ -1740,6 +1740,7 @@ int msm_dsi_host_init(struct msm_dsi *msm_dsi)
>  
>  	msm_host->rx_buf = devm_kzalloc(&pdev->dev, SZ_4K, GFP_KERNEL);
>  	if (!msm_host->rx_buf) {
> +		ret = -ENOMEM;
>  		pr_err("%s: alloc rx temp buf failed\n", __func__);
>  		goto fail;
>  	}
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno

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

end of thread, other threads:[~2017-02-14 20:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-09 15:19 [PATCH -next] drm/msm/dsi: fix error return code in msm_dsi_host_init() Wei Yongjun
     [not found] ` <20170209151907.28800-1-weiyj.lk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-02-14 20:14   ` Daniel Vetter

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).