summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/mxsfb
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2017-02-05 19:00:36 +0300
committerDaniel Vetter <daniel.vetter@ffwll.ch>2017-02-06 18:57:36 +0300
commite6cf7e9808a42e74abd80f10e7c8ed4107e0d99f (patch)
treea75c02fa8195de35fe5fa0a8db397578ccd37b19 /drivers/gpu/drm/mxsfb
parent612fb5d9f41622ad86c94f897faa2343817abb1a (diff)
downloadlinux-e6cf7e9808a42e74abd80f10e7c8ed4107e0d99f.tar.xz
drm: mxsfb: fix error return code in mxsfb_load()
Fix to return a negative error code from the 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/20170205160036.7364-1-weiyj.lk@gmail.com
Diffstat (limited to 'drivers/gpu/drm/mxsfb')
-rw-r--r--drivers/gpu/drm/mxsfb/mxsfb_drv.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.c b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
index cdfbe0284635..28a75cb155f7 100644
--- a/drivers/gpu/drm/mxsfb/mxsfb_drv.c
+++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
@@ -221,6 +221,7 @@ static int mxsfb_load(struct drm_device *drm, unsigned long flags)
mxsfb->fbdev = drm_fbdev_cma_init(drm, 32,
drm->mode_config.num_connector);
if (IS_ERR(mxsfb->fbdev)) {
+ ret = PTR_ERR(mxsfb->fbdev);
mxsfb->fbdev = NULL;
dev_err(drm->dev, "Failed to init FB CMA area\n");
goto err_cma;