drm/msm/dsi: fix error return code in msm_dsi_host_init()
authorWei Yongjun <weiyongjun1@huawei.com>
Thu, 9 Feb 2017 15:19:07 +0000 (15:19 +0000)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 14 Feb 2017 20:14:39 +0000 (21:14 +0100)
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>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20170209151907.28800-1-weiyj.lk@gmail.com
drivers/gpu/drm/msm/dsi/dsi_host.c

index 3819fdefcae2192206097cd41aaf99bbf40b6e85..c96e270361b085539a97529f5bad1f5dcba90b86 100644 (file)
@@ -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;
        }