[PATCH] radeonfb: If no video memory, exit with error

From: Bjorn Helgaas
Date: Thu Oct 21 2004 - 13:21:38 EST


Nothing useful will happen if we try to ioremap and use a zero-sized
frame buffer. I observed this problem on an ia64 sx1000 box, where
the BIOS doesn't run the option ROM. If we try to continue, radeonfb
just gets hopelessly confused because the card isn't initialized
correctly.
[PATCH] radeonfb: If no video memory, exit with error

Nothing good will happen if we try to ioremap and use a zero-sized
frame buffer. I observed this problem on an ia64 sx1000 box, where
the BIOS doesn't run the option ROM. If we try to continue, radeonfb
just gets hopelessly confused because the card isn't initialized
correctly.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@xxxxxx>

===== drivers/video/aty/radeon_base.c 1.32 vs edited =====
--- 1.32/drivers/video/aty/radeon_base.c 2004-10-19 03:40:34 -06:00
+++ edited/drivers/video/aty/radeon_base.c 2004-10-21 11:50:51 -06:00
@@ -2186,7 +2186,9 @@
rinfo->video_ram = 8192 * 1024;
break;
default:
- break;
+ printk (KERN_ERR "radeonfb: no video RAM reported\n");
+ ret = -ENXIO;
+ goto err_unmap_rom;
}
}