From: Lukasz Majewski Date: Fri, 11 May 2018 14:51:03 +0000 (+0200) Subject: display5: spl: Check return code of the env_* functions X-Git-Tag: v2018.07-rc3~15^2~54 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e087905a48ee8042ffdd9531b6aada6be2751ed1;p=platform%2Fkernel%2Fu-boot.git display5: spl: Check return code of the env_* functions Force booting through u-boot proper when environment error encountered (as a result of either broken SPI-NOR or erased envs). Signed-off-by: Lukasz Majewski --- diff --git a/board/liebherr/display5/spl.c b/board/liebherr/display5/spl.c index 6508e0f..0d25b0d9 100644 --- a/board/liebherr/display5/spl.c +++ b/board/liebherr/display5/spl.c @@ -210,8 +210,8 @@ void board_boot_order(u32 *spl_boot_list) /* 'fastboot' */ const char *s; - env_init(); - env_load(); + if (env_init() || env_load()) + return; s = env_get("BOOT_FROM"); if (s && !bootcount_error() && strcmp(s, "ACTIVE") == 0) {