mirror of
https://xff.cz/git/u-boot/
synced 2025-09-27 21:41:16 +02:00
env: Allow env_load() to detect errors
Now that we have errors available in the environment driver's load() method, check the return valid. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
2
env/env.c
vendored
2
env/env.c
vendored
@@ -98,7 +98,7 @@ int env_load(void)
|
|||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
if (!drv->load)
|
if (!drv->load)
|
||||||
return 0;
|
return 0;
|
||||||
drv->load(); /* TODO(sjg@chromium.org): Make this return an error */
|
ret = drv->load();
|
||||||
if (ret) {
|
if (ret) {
|
||||||
debug("%s: Environment failed to load (err=%d)\n", __func__,
|
debug("%s: Environment failed to load (err=%d)\n", __func__,
|
||||||
ret);
|
ret);
|
||||||
|
Reference in New Issue
Block a user