summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorWei Yongjun <weiyj.lk@gmail.com>2016-08-15 18:03:51 +0300
committerDaniel Vetter <daniel.vetter@ffwll.ch>2016-08-16 10:10:16 +0300
commitb0f566838cfe086a96bffd9c67dd8844a41870ea (patch)
treec947349cfd9113bb9239eb3cba51433025a5266b /drivers/gpu/drm
parentae4e46b14bd7a12fb7908425846be7ceb0853bbc (diff)
downloadlinux-b0f566838cfe086a96bffd9c67dd8844a41870ea.tar.xz
drm/mgag200: fix error return code in mgag200fb_create()
Fix to return error code -ENOMEM from the vmalloc() error handling case instead of 0, as done elsewhere in this function. Fixes: aec9e12953e7 ("drm/mgag200: Fix error handling paths in fbdev driver") Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1471273431-6753-1-git-send-email-weiyj.lk@gmail.com
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/mgag200/mgag200_fb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/mgag200/mgag200_fb.c b/drivers/gpu/drm/mgag200/mgag200_fb.c
index 81325f64134f..88dd2214114d 100644
--- a/drivers/gpu/drm/mgag200/mgag200_fb.c
+++ b/drivers/gpu/drm/mgag200/mgag200_fb.c
@@ -183,8 +183,10 @@ static int mgag200fb_create(struct drm_fb_helper *helper,
}
sysram = vmalloc(size);
- if (!sysram)
+ if (!sysram) {
+ ret = -ENOMEM;
goto err_sysram;
+ }
info = drm_fb_helper_alloc_fbi(helper);
if (IS_ERR(info)) {