patch-2.4.11-dontuse linux/drivers/video/sun3fb.c

Next file: linux/drivers/video/tdfxfb.c
Previous file: linux/drivers/video/sis/Makefile
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.10/linux/drivers/video/sun3fb.c linux/drivers/video/sun3fb.c
@@ -521,7 +521,7 @@
     /*
      *  Initialisation
      */
-static void __init sun3fb_init_fb(int fbtype, unsigned long addr)
+static int __init sun3fb_init_fb(int fbtype, unsigned long addr)
 {
 	static struct linux_sbus_device sdb;
 	struct fb_fix_screeninfo *fix;
@@ -587,8 +587,8 @@
 	fb->cursor.hwsize.fby = 32;
 	
 	if (depth > 1 && !fb->color_map) {
-		fb->color_map = kmalloc(256 * 3, GFP_ATOMIC);
-		return -ENOMEM;
+		if((fb->color_map = kmalloc(256 * 3, GFP_ATOMIC))==NULL)
+			return -ENOMEM;
 	}
 			
 	switch(fbtype) {
@@ -605,7 +605,7 @@
 	
 	if (!p) {
 		kfree(fb);
-		-ENODEV;
+		return -ENODEV;
 	}
 	
 	if (p == SBUSFBINIT_SIZECHANGE)

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