From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Sun, 20 Aug 2017 04:45:14 -0600 Subject: [U-Boot] [PATCH 2/3] env: Allow env_load() to detect errors In-Reply-To: <20170820104516.156451-1-sjg@chromium.org> References: <20170820104516.156451-1-sjg@chromium.org> Message-ID: <20170820104516.156451-2-sjg@chromium.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Now that we have errors available in the environment driver's load() method, check the return valid. Signed-off-by: Simon Glass --- env/env.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/env/env.c b/env/env.c index 8671f13f8d..1255d57f48 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 at chromium.org): Make this return an error */ + ret = drv->load(); if (ret) { debug("%s: Environment failed to load (err=%d)\n", __func__, ret); -- 2.14.1.480.gb18f417b89-goog