mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-28 15:41:40 +00:00
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
1 changed files with 3 additions and 1 deletions
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;
|
flags |= H_DEFAULT;
|
||||||
if (himport_r(&env_htab, default_environment,
|
if (himport_r(&env_htab, default_environment,
|
||||||
sizeof(default_environment), '\0', flags, 0,
|
sizeof(default_environment), '\0', flags, 0,
|
||||||
0, NULL) == 0)
|
0, NULL) == 0) {
|
||||||
pr_err("## Error: Environment import failed: errno = %d\n",
|
pr_err("## Error: Environment import failed: errno = %d\n",
|
||||||
errno);
|
errno);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
gd->flags |= GD_FLG_ENV_READY;
|
gd->flags |= GD_FLG_ENV_READY;
|
||||||
gd->flags |= GD_FLG_ENV_DEFAULT;
|
gd->flags |= GD_FLG_ENV_DEFAULT;
|
||||||
|
|
Loading…
Reference in a new issue