aboutsummaryrefslogtreecommitdiff
path: root/env
diff options
context:
space:
mode:
Diffstat (limited to 'env')
-rw-r--r--env/env.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/env/env.c b/env/env.c
index e4dfb92..7168cb9 100644
--- a/env/env.c
+++ b/env/env.c
@@ -322,17 +322,18 @@ int env_init(void)
debug("%s: Environment %s init done (ret=%d)\n", __func__,
drv->name, ret);
-
- if (gd->env_valid == ENV_INVALID)
- ret = -ENOENT;
}
- if (!prio)
- return -ENODEV;
+ if (!prio) {
+ gd->env_addr = (ulong)&default_environment[0];
+ gd->env_valid = ENV_INVALID;
+
+ return 0;
+ }
if (ret == -ENOENT) {
gd->env_addr = (ulong)&default_environment[0];
- gd->env_valid = ENV_VALID;
+ gd->env_valid = ENV_INVALID;
return 0;
}