mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
fbdev: imsttfb: Release framebuffer and dealloc cmap on error path
[ Upstream commit 5cf9a090a3 ]
Add missing cleanups in error path.
Signed-off-by: Helge Deller <deller@gmx.de>
Stable-dep-of: e08c30efda21 ("fbdev: imsttfb: fix double free in probe()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
51a1b94302
commit
f2a79f3651
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user