From: Simon Glass Date: Sun, 20 Aug 2017 10:45:14 +0000 (-0600) Subject: env: Allow env_load() to detect errors X-Git-Tag: v2017.09-rc3~54 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c55d8b940047050176ded2e24be74f4a97e093e3;p=platform%2Fkernel%2Fu-boot.git 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 --- diff --git a/env/env.c b/env/env.c index 8671f13..1255d57 100644 --- 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);