summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAnatolij Gustschin <agust@denx.de>2016-11-30 14:30:59 +0100
committerAnatolij Gustschin <agust@denx.de>2017-01-13 20:20:35 +0100
commitb4fc6f221474e2bc9f3e4af52556fd4ab5cbb9b9 (patch)
tree4cab5a75b7879adbdb85e0315ff567424d423549 /drivers
parentdb1b79b886f085b5af09db9378f5c53417c3ecde (diff)
downloadu-boot-imx-b4fc6f221474e2bc9f3e4af52556fd4ab5cbb9b9.zip
u-boot-imx-b4fc6f221474e2bc9f3e4af52556fd4ab5cbb9b9.tar.gz
u-boot-imx-b4fc6f221474e2bc9f3e4af52556fd4ab5cbb9b9.tar.bz2
video: cfb_console: fix hang if splashimage file is missing
If the splash file doesn't exist, the booting stops bricking the boards. Check return value of prepare function and stop decoding the logo data if splash prepare stage failed. Signed-off-by: Anatolij Gustschin <agust@denx.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/cfb_console.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
index c0b1b8d..a4cbc44 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -1861,14 +1861,16 @@ static void *video_logo(void)
__maybe_unused int y_off = 0;
__maybe_unused ulong addr;
__maybe_unused char *s;
- __maybe_unused int len, space;
+ __maybe_unused int len, ret, space;
splash_get_pos(&video_logo_xpos, &video_logo_ypos);
#ifdef CONFIG_SPLASH_SCREEN
s = getenv("splashimage");
if (s != NULL) {
- splash_screen_prepare();
+ ret = splash_screen_prepare();
+ if (ret < 0)
+ return video_fb_address;
addr = simple_strtoul(s, NULL, 16);
if (video_display_bitmap(addr,