mirror of
https://github.com/torvalds/linux.git
synced 2024-12-30 14:52:05 +00:00
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: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
This commit is contained in:
parent
31ff6b2a42
commit
d9b1fe6516
@ -1889,6 +1889,9 @@ static void sm501_free_init_fb(struct sm501fb_info *info,
|
|||||||
{
|
{
|
||||||
struct fb_info *fbi = info->fb[head];
|
struct fb_info *fbi = info->fb[head];
|
||||||
|
|
||||||
|
if (!fbi)
|
||||||
|
return;
|
||||||
|
|
||||||
fb_dealloc_cmap(&fbi->cmap);
|
fb_dealloc_cmap(&fbi->cmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user