Index: kernel/genarch/src/fb/fb.c
===================================================================
--- kernel/genarch/src/fb/fb.c	(revision 19490cea4251de33ed19741087be0c03ff4d2a4f)
+++ kernel/genarch/src/fb/fb.c	(revision 00a020d0a7dfe0851db7d1e51ad55d59bea39b87)
@@ -458,6 +458,11 @@
  *
  */
-void fb_init(fb_properties_t *props)
-{
+bool fb_init(fb_properties_t *props)
+{
+	ASSERT(props);
+	ASSERT(props->x > 0);
+	ASSERT(props->y > 0);
+	ASSERT(props->scan > 0);
+	
 	switch (props->visual) {
 	case VISUAL_INDIRECT_8:
@@ -506,5 +511,6 @@
 		break;
 	default:
-		panic("Unsupported visual.");
+		LOG("Unsupported visual.");
+		return false;
 	}
 	
@@ -536,21 +542,33 @@
 	size_t glyphsize = FONT_GLYPHS * glyphbytes;
 	
+	fb_addr = (uint8_t *) hw_map((uintptr_t) props->addr, fbsize);
+	if (!fb_addr) {
+		LOG("Unable to map framebuffer.");
+		return false;
+	}
+	
 	backbuf = (uint16_t *) malloc(bbsize, 0);
-	if (!backbuf)
-		panic("Unable to allocate backbuffer.");
+	if (!backbuf) {
+		LOG("Unable to allocate backbuffer.");
+		return false;
+	}
 	
 	glyphs = (uint8_t *) malloc(glyphsize, 0);
-	if (!glyphs)
-		panic("Unable to allocate glyphs.");
+	if (!glyphs) {
+		free(backbuf);
+		LOG("Unable to allocate glyphs.");
+		return false;
+	}
 	
 	bgscan = malloc(bgscanbytes, 0);
-	if (!bgscan)
-		panic("Unable to allocate background pixel.");
+	if (!bgscan) {
+		free(glyphs);
+		free(backbuf);
+		LOG("Unable to allocate background pixel.");
+		return false;
+	}
 	
 	memsetw(backbuf, cols * rows, 0);
-	
 	glyphs_render();
-	
-	fb_addr = (uint8_t *) hw_map((uintptr_t) props->addr, fbsize);
 	
 	sysinfo_set_item_val("fb", NULL, true);
@@ -566,4 +584,6 @@
 	outdev_initialize("fb", &fb_console, &fb_ops);
 	stdout = &fb_console;
+	
+	return true;
 }
 
