mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-15 15:04:27 +08:00
fbdev: imsttfb: Release framebuffer and dealloc cmap on error path
Add missing cleanups in error path. Signed-off-by: Helge Deller <deller@gmx.de>
This commit is contained in:
parent
780328abc0
commit
5cf9a090a3
@ -1452,9 +1452,13 @@ static int init_imstt(struct fb_info *info)
|
||||
FBINFO_HWACCEL_FILLRECT |
|
||||
FBINFO_HWACCEL_YPAN;
|
||||
|
||||
fb_alloc_cmap(&info->cmap, 0, 0);
|
||||
if (fb_alloc_cmap(&info->cmap, 0, 0)) {
|
||||
framebuffer_release(info);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
if (register_framebuffer(info) < 0) {
|
||||
fb_dealloc_cmap(&info->cmap);
|
||||
framebuffer_release(info);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user