mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-19 18:24:14 +08:00
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: aec9e12953
("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
This commit is contained in:
parent
ae4e46b14b
commit
b0f566838c
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user