u-boot: Improve error checking on framebuffer

This commit is contained in:
Alexander von Gluck IV
2015-03-10 22:40:38 -05:00
parent 2ac9acbba4
commit 91c878846b
+11 -3
View File
@@ -121,10 +121,18 @@ platform_init_video(void)
#endif #endif
#endif #endif
if (gFramebuffer != NULL) { if (gFramebuffer == NULL) {
gFramebuffer->Probe(); ERROR("No framebuffer device found!\n");
gFramebuffer->Init(); return B_ERROR;
} }
status_t result = gFramebuffer->Probe();
if (result != B_OK)
return result;
gFramebuffer->Init();
if (result != B_OK)
return result;
return B_OK; return B_OK;
} }