Skip to contentSkip to conversation

Small fix in fbmem

PATCH New Karl Lessard 1 participant 1 message Oct 26, 2004 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Small fix in fbmem

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

drivers/video/fbmem.c.patched renamed from drivers/video/fbmem.c +1 -1
@@ -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;