From: Wei Yongjun Date: Sun, 5 Feb 2017 16:00:36 +0000 (+0000) Subject: drm: mxsfb: fix error return code in mxsfb_load() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e6cf7e9808a42e74abd80f10e7c8ed4107e0d99f;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170205160036.7364-1-weiyj.lk@gmail.com --- 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;