projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
31ff6b2
)
sm501fb: deallocate colormap only if allocated
author
Sudip Mukherjee
<
[email protected]
>
Thu, 9 Nov 2017 17:09:31 +0000
(18:09 +0100)
committer
Bartlomiej Zolnierkiewicz
<
[email protected]
>
Thu, 9 Nov 2017 17:09:31 +0000
(18:09 +0100)
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 <
[email protected]
>
Signed-off-by: Bartlomiej Zolnierkiewicz <
[email protected]
>
drivers/video/fbdev/sm501fb.c
patch
|
blob
|
history
diff --git
a/drivers/video/fbdev/sm501fb.c
b/drivers/video/fbdev/sm501fb.c
index 076dd2711630e1f78c3bf19572915b0b2b9831ee..381475fa137b5d1ed1b5be28554d9c80e64ea165 100644
(file)
--- a/
drivers/video/fbdev/sm501fb.c
+++ b/
drivers/video/fbdev/sm501fb.c
@@
-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);
}