We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 780328a commit 5cf9a09Copy full SHA for 5cf9a09
1 file changed
drivers/video/fbdev/imsttfb.c
@@ -1452,9 +1452,13 @@ static int init_imstt(struct fb_info *info)
1452
FBINFO_HWACCEL_FILLRECT |
1453
FBINFO_HWACCEL_YPAN;
1454
1455
- fb_alloc_cmap(&info->cmap, 0, 0);
+ if (fb_alloc_cmap(&info->cmap, 0, 0)) {
1456
+ framebuffer_release(info);
1457
+ return -ENODEV;
1458
+ }
1459
1460
if (register_framebuffer(info) < 0) {
1461
+ fb_dealloc_cmap(&info->cmap);
1462
framebuffer_release(info);
1463
return -ENODEV;
1464
}
0 commit comments