diff options
author | Marek BehĂșn <marek.behun@nic.cz> | 2021-11-04 02:23:21 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2021-11-13 18:16:39 +0300 |
commit | c9db4c5440d760eedf80448d42559125ee1d0626 (patch) | |
tree | f74879384ace0580389a2545305eb8fec81bfe8b /env/common.c | |
parent | 0427bed63bece3caeb8153548903146b73b56677 (diff) | |
download | u-boot-c9db4c5440d760eedf80448d42559125ee1d0626.tar.xz |
env: Don't set ready flag if import failed in env_set_default()
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>
Diffstat (limited to 'env/common.c')
-rw-r--r-- | env/common.c | 4 |
1 files changed, 3 insertions, 1 deletions
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; |