Message ID | 20211103232332.2737-2-kabel@kernel.org |
---|---|
State | Accepted |
Commit | c9db4c5440d760eedf80448d42559125ee1d0626 |
Delegated to: | Simon Glass |
Headers | show |
Series | Board specific runtime determined default env | expand |
From: Marek Behún <marek.behun@nic.cz> Do not set GD_FLG_ENV_READY nor GD_FLG_ENV_DEFAULT if failed importing in env_set_default(). Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Simon Glass <sjg@chromium.org> --- env/common.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) Applied to u-boot-dm, thanks!
diff --git a/env/common.c b/env/common.c index 99729ca002..2aa23545ba 100644 --- a/env/common.c +++ b/env/common.c @@ -261,9 +261,11 @@ void env_set_default(const char *s, int flags) flags |= H_DEFAULT; if (himport_r(&env_htab, default_environment, sizeof(default_environment), '\0', flags, 0, - 0, NULL) == 0) + 0, NULL) == 0) { pr_err("## Error: Environment import failed: errno = %d\n", errno); + return; + } gd->flags |= GD_FLG_ENV_READY; gd->flags |= GD_FLG_ENV_DEFAULT;