diff options
author | Helge Deller <deller@gmx.de> | 2023-05-27 11:28:36 +0200 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2023-05-27 19:14:26 +0200 |
commit | 5cf9a090a39c97f4506b7b53739d469b1c05a7e9 (patch) | |
tree | e0064c9b4750f3f3b5c3beec63c018bd95a76c86 /drivers/video | |
parent | 780328abc0cbde7398d3c04be56fbb5f89ed10b8 (diff) | |
download | linux-stable-5cf9a090a39c97f4506b7b53739d469b1c05a7e9.tar.gz linux-stable-5cf9a090a39c97f4506b7b53739d469b1c05a7e9.tar.bz2 linux-stable-5cf9a090a39c97f4506b7b53739d469b1c05a7e9.zip |
fbdev: imsttfb: Release framebuffer and dealloc cmap on error path
Add missing cleanups in error path.
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/fbdev/imsttfb.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/video/fbdev/imsttfb.c b/drivers/video/fbdev/imsttfb.c index 975dd682fae4..075f11991281 100644 --- 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; } |