]> git.sur5r.net Git - u-boot/commitdiff
video: Check for valid FB pointer before clearing
authorDuncan Laurie <dlaurie@chromium.org>
Sat, 3 Nov 2012 11:41:40 +0000 (11:41 +0000)
committerSimon Glass <sjg@chromium.org>
Thu, 6 Dec 2012 22:30:44 +0000 (14:30 -0800)
This command will start erasing at memory address zero
if there is not a valid framebuffer address that was found
during video_init().

This is a common case with Chrome OS devices in normal mode
when we do not execute the video option rom in coreboot.

Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/video/cfb_console.c

index 9388859da7e07f52ca324adfabdd49f9fbadbe08..26f673a96a9b8937932df50395cecbac87b0e23f 100644 (file)
@@ -2293,6 +2293,8 @@ int video_get_screen_columns(void)
 
 void video_clear(void)
 {
+       if (!video_fb_address)
+               return;
 #ifdef VIDEO_HW_RECTFILL
        video_hw_rectfill(VIDEO_PIXEL_SIZE,     /* bytes per pixel */
                          0,                    /* dest pos x */