From: Lukasz Majewski Date: Fri, 11 May 2018 16:51:03 +0200 Subject: [U-Boot] [PATCH v1 05/21] display5: spl: Check return code of the env_* functions In-Reply-To: <20180511145119.20942-1-lukma@denx.de> References: <20180511145119.20942-1-lukma@denx.de> Message-ID: <20180511145119.20942-6-lukma@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- board/liebherr/display5/spl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/board/liebherr/display5/spl.c b/board/liebherr/display5/spl.c index 6508e0ffa7..0d25b0d996 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) { -- 2.11.0