projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
780328a
)
fbdev: imsttfb: Release framebuffer and dealloc cmap on error path
author
Helge Deller
<deller@gmx.de>
Sat, 27 May 2023 09:28:36 +0000
(11:28 +0200)
committer
Helge Deller
<deller@gmx.de>
Sat, 27 May 2023 17:14:26 +0000
(19:14 +0200)
Add missing cleanups in error path.
Signed-off-by: Helge Deller <deller@gmx.de>
drivers/video/fbdev/imsttfb.c
patch
|
blob
|
history
diff --git
a/drivers/video/fbdev/imsttfb.c
b/drivers/video/fbdev/imsttfb.c
index
975dd68
..
075f119
100644
(file)
--- a/
drivers/video/fbdev/imsttfb.c
+++ b/
drivers/video/fbdev/imsttfb.c
@@
-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;
}