Skip to content

Commit

Permalink
drm/msm/dsi: fix error return code in msm_dsi_host_init()
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Wei Yongjun authored and Daniel Vetter committed Feb 14, 2017
1 parent 5721a38 commit cd57b48
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/gpu/drm/msm/dsi/dsi_host.c
Original file line number Diff line number Diff line change
@@ -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;
}

0 comments on commit cd57b48

Please sign in to comment.