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
if (gFramebuffer != NULL) {
gFramebuffer->Probe();
gFramebuffer->Init();
if (gFramebuffer == NULL) {
ERROR("No framebuffer device found!\n");
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;
}