From: Wei Yongjun Date: Thu, 9 Feb 2017 15:19:07 +0000 (+0000) Subject: drm/msm/dsi: fix error return code in msm_dsi_host_init() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cd57b48a4a33faa57f147623beee193759e69ba6;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm/msm/dsi: fix error return code in msm_dsi_host_init() 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 Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170209151907.28800-1-weiyj.lk@gmail.com --- diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index 3819fdefcae2..c96e270361b0 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c @@ -1743,6 +1743,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; }