summaryrefslogtreecommitdiff
path: root/env/fat.c
diff options
context:
space:
mode:
authorSimon Goldschmidt <sgoldschmidt@de.pepperl-fuchs.com>2018-01-31 14:47:12 +0100
committerTom Rini <trini@konsulko.com>2018-02-01 08:05:53 -0500
commit2166ebf7831674508425daf50c78e481083c6462 (patch)
tree7f872e44844c2ec406737d71a71188368e3be38a /env/fat.c
parent31f044bd91df58bed6bb8cfadfc187eedac1442e (diff)
downloadu-boot-2166ebf7831674508425daf50c78e481083c6462.tar.gz
u-boot-2166ebf7831674508425daf50c78e481083c6462.tar.bz2
u-boot-2166ebf7831674508425daf50c78e481083c6462.zip
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>
Diffstat (limited to 'env/fat.c')
-rw-r--r--env/fat.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/env/fat.c b/env/fat.c
index 158a9a3435..35f7ab5c6d 100644
--- a/env/fat.c
+++ b/env/fat.c
@@ -117,8 +117,7 @@ static int env_fat_load(void)
goto err_env_relocate;
}
- env_import(buf, 1);
- return 0;
+ return env_import(buf, 1);
err_env_relocate:
set_default_env(NULL);