patch-2.3.99-pre7 linux/drivers/video/vesafb.c

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

diff -u --recursive --new-file v2.3.99-pre6/linux/drivers/video/vesafb.c linux/drivers/video/vesafb.c
@@ -543,12 +543,19 @@
 
 	if (!request_mem_region(video_base, video_size, "vesafb")) {
 		printk(KERN_ERR
-		       "vesafb: abort, cannot reserve video memory at 0x%lu\n",
+		       "vesafb: abort, cannot reserve video memory at 0x%lx\n",
 			video_base);
-		return -1;
+		return -EBUSY;
 	}
 
         video_vbase = ioremap(video_base, video_size);
+	if (!video_vbase) {
+		release_mem_region(video_base, video_size);
+		printk(KERN_ERR
+		       "vesafb: abort, cannot ioremap video memory 0x%lx @ 0x%lx\n",
+			video_size, video_base);
+		return -EIO;
+	}
 
 	printk(KERN_INFO "vesafb: framebuffer at 0x%lx, mapped to 0x%p, size %dk\n",
 	       video_base, video_vbase, video_size/1024);

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