summaryrefslogtreecommitdiff
path: root/env/onenand.c
diff options
context:
space:
mode:
Diffstat (limited to 'env/onenand.c')
-rw-r--r--env/onenand.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/env/onenand.c b/env/onenand.c
index 2e3045c5f5..10a8cccbe8 100644
--- a/env/onenand.c
+++ b/env/onenand.c
@@ -57,10 +57,10 @@ static int env_onenand_load(void)
#endif /* !ENV_IS_EMBEDDED */
rc = env_import(buf, 1);
- if (rc)
+ if (!rc)
gd->env_valid = ENV_VALID;
- return rc ? 0 : -EIO;
+ return rc;
}
static int env_onenand_save(void)