
From: Bjorn Helgaas <bjorn.helgaas@hp.com>

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@hp.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/drivers/video/aty/radeon_base.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

diff -puN drivers/video/aty/radeon_base.c~radeonfb-if-no-video-memory-exit-with-error drivers/video/aty/radeon_base.c
--- 25/drivers/video/aty/radeon_base.c~radeonfb-if-no-video-memory-exit-with-error	2004-10-26 19:28:40.075588744 -0700
+++ 25-akpm/drivers/video/aty/radeon_base.c	2004-10-26 19:28:40.082587680 -0700
@@ -2186,7 +2186,9 @@ static int radeonfb_pci_register (struct
 	       		rinfo->video_ram = 8192 * 1024;
 	       		break;
 	       	default:
-	       		break;
+			printk (KERN_ERR "radeonfb: no video RAM reported\n");
+			ret = -ENXIO;
+			goto err_unmap_rom;
 		}
 	}
 
_
