]> git.sur5r.net Git - u-boot/commitdiff
display5: spl: Check return code of the env_* functions
authorLukasz Majewski <lukma@denx.de>
Fri, 11 May 2018 14:51:03 +0000 (16:51 +0200)
committerStefano Babic <sbabic@denx.de>
Mon, 18 Jun 2018 13:42:38 +0000 (15:42 +0200)
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 <lukma@denx.de>
board/liebherr/display5/spl.c

index 6508e0ffa7dfa3c0e1e75145769175dfc9cf6631..0d25b0d99632fd6faaf6f21c4d37215adef378c1 100644 (file)
@@ -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) {