]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
env: Allow env_load() to detect errors
authorSimon Glass <sjg@chromium.org>
Sun, 20 Aug 2017 10:45:14 +0000 (04:45 -0600)
committerTom Rini <trini@konsulko.com>
Sun, 20 Aug 2017 23:27:43 +0000 (19:27 -0400)
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>
env/env.c

index 8671f13f8d9e6fd983440380da3709c9d8cffdfa..1255d57f48d29ece6a668cc85c41c0c3cc8d1d08 100644 (file)
--- a/env/env.c
+++ b/env/env.c
@@ -98,7 +98,7 @@ int env_load(void)
                return -ENODEV;
        if (!drv->load)
                return 0;
-       drv->load();  /* TODO(sjg@chromium.org): Make this return an error */
+       ret = drv->load();
        if (ret) {
                debug("%s: Environment failed to load (err=%d)\n", __func__,
                      ret);