[PATCH] Small fix in fbmem
From: Karl Lessard
Date: Tue Oct 26 2004 - 13:24:22 EST
Hi, this small patch may avoid terrific crashes in case that a fb driver
don't implements the fb_blank method and do use the generic one.
Thanks,
Karl
--- linux/drivers/video/fbmem.c Tue Oct 26 14:09:42 2004
+++ linux/drivers/video/fbmem.c.patched Tue Oct 26 14:13:37 2004
@@ -862,7 +862,7 @@
return 0;
if (blank) {
black = kmalloc(sizeof(u16) * info->cmap.len, GFP_KERNEL);
- if (!black) {
+ if (black) {
memset(black, 0, info->cmap.len * sizeof(u16));
cmap.red = cmap.green = cmap.blue = black;
cmap.transp = info->cmap.transp ? black : NULL;