diff options
author | Marek Vasut <marex@denx.de> | 2020-05-30 22:44:45 +0200 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2020-06-08 10:42:58 +0200 |
commit | dae6cb8fb757fa13d9f894a67443a7ea7e93c6bc (patch) | |
tree | 64fa5101596bd401458beb402f070d97421976e5 /board | |
parent | 0e06d63d195670f5181958f43216d7106c05357f (diff) | |
download | u-boot-dae6cb8fb757fa13d9f894a67443a7ea7e93c6bc.zip u-boot-dae6cb8fb757fa13d9f894a67443a7ea7e93c6bc.tar.gz u-boot-dae6cb8fb757fa13d9f894a67443a7ea7e93c6bc.tar.bz2 |
ARM: imx: m53menlo: Do not fail boot on invalid splash screen
None of these splash screen loading errors are so critical as to
justify complete failure to boot, so just print error message as
needed and return 0, the boot can very likely continue without
the splash.
Fix a couple of missing free(dst) instances as well.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: NXP i.MX U-Boot Team <uboot-imx@nxp.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Diffstat (limited to 'board')
-rw-r--r-- | board/menlo/m53menlo/m53menlo.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/board/menlo/m53menlo/m53menlo.c b/board/menlo/m53menlo/m53menlo.c index 58a564a..d4288a2 100644 --- a/board/menlo/m53menlo/m53menlo.c +++ b/board/menlo/m53menlo/m53menlo.c @@ -353,24 +353,28 @@ int board_late_init(void) ret = splash_screen_prepare(); if (ret < 0) - return ret; + goto splasherr; len = CONFIG_SYS_VIDEO_LOGO_MAX_SIZE; ret = gunzip(dst + 2, CONFIG_SYS_VIDEO_LOGO_MAX_SIZE - 2, (uchar *)addr, &len); if (ret) { printf("Error: no valid bmp or bmp.gz image at %lx\n", addr); - free(dst); - return ret; + goto splasherr; } ret = uclass_get_device(UCLASS_VIDEO, 0, &dev); if (ret) - return ret; + goto splasherr; ret = video_bmp_display(dev, (ulong)dst + 2, xpos, ypos, true); if (ret) - return ret; + goto splasherr; + + return 0; + +splasherr: + free(dst); #endif return 0; } |