env: make env drivers propagate env_import return value
For multiple env drivers to correctly implement fallback when one environment fails to load (e.g. crc error), the return value of env_import has to be propagated by all env driver's load function. Without this change, the first driver that succeeds to load an environment with an invalid CRC return 0 (success) and no other drivers are checked. Signed-off-by: Simon Goldschmidt <sgoldschmidt@de.pepperl-fuchs.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
This commit is contained in:
committed by
Tom Rini
parent
31f044bd91
commit
2166ebf783
4
env/flash.c
vendored
4
env/flash.c
vendored
@@ -351,9 +351,7 @@ static int env_flash_load(void)
|
||||
"reading environment; recovered successfully\n\n");
|
||||
#endif /* CONFIG_ENV_ADDR_REDUND */
|
||||
|
||||
env_import((char *)flash_addr, 1);
|
||||
|
||||
return 0;
|
||||
return env_import((char *)flash_addr, 1);
|
||||
}
|
||||
#endif /* LOADENV */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user