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>
This commit is contained in:
parent
0427bed63b
commit
c9db4c5440
4
env/common.c
vendored
4
env/common.c
vendored
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user