mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 15:14:43 +00:00
env: sf: Put ENV_INVALID into gd->env_valid on CRC failure
env_sf_init_addr() says the environment is valid even if it is assigning default environment due to CRC failure. Change this to ENV_INVALID and let the generic env_init() function, which calls this initializer, assign the default environment. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
87221bd66c
commit
af8149e9ac
1 changed files with 1 additions and 2 deletions
3
env/sf.c
vendored
3
env/sf.c
vendored
|
@ -341,8 +341,7 @@ static int env_sf_init_addr(void)
|
||||||
gd->env_addr = (ulong)&(env_ptr->data);
|
gd->env_addr = (ulong)&(env_ptr->data);
|
||||||
gd->env_valid = ENV_VALID;
|
gd->env_valid = ENV_VALID;
|
||||||
} else {
|
} else {
|
||||||
gd->env_addr = (ulong)&default_environment[0];
|
gd->env_valid = ENV_INVALID;
|
||||||
gd->env_valid = ENV_VALID;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue