Commit d9b1fe65 authored by Sudip Mukherjee's avatar Sudip Mukherjee Committed by Bartlomiej Zolnierkiewicz

sm501fb: deallocate colormap only if allocated

There are cases when panel and crt both are not defined and only one of
them is defined and initialized. In such cases, while removing the
device deallocate the colormap only if that particular fb is defined.
Signed-off-by: default avatarSudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
parent 31ff6b2a
......@@ -1889,6 +1889,9 @@ static void sm501_free_init_fb(struct sm501fb_info *info,
{
struct fb_info *fbi = info->fb[head];
if (!fbi)
return;
fb_dealloc_cmap(&fbi->cmap);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment