patch-2.4.10 linux/drivers/video/sun3fb.c

Next file: linux/drivers/video/tcxfb.c
Previous file: linux/drivers/video/sticore.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.9/linux/drivers/video/sun3fb.c linux/drivers/video/sun3fb.c
@@ -586,9 +586,11 @@
 	fb->cursor.hwsize.fbx = 32;
 	fb->cursor.hwsize.fby = 32;
 	
-	if (depth > 1 && !fb->color_map)
+	if (depth > 1 && !fb->color_map) {
 		fb->color_map = kmalloc(256 * 3, GFP_ATOMIC);
-		
+		return -ENOMEM;
+	}
+			
 	switch(fbtype) {
 #ifdef CONFIG_FB_CGSIX
 	case FBTYPE_SUNFAST_COLOR:
@@ -687,3 +689,5 @@
 	}
 #endif			
 }
+
+MODULE_LICENSE("GPL");

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)