diff options
author | Pali Rohár | 2022-08-07 21:06:04 +0200 |
---|---|---|
committer | Tom Rini | 2022-08-20 18:12:51 -0400 |
commit | a871af2d5a59c26d4ff7e60530a7afce0742e6f0 (patch) | |
tree | aab0e045090d47d91973c8cceeedf54b823e78bf /common | |
parent | cc0b36536b8ffe89293930934439c8148afa075c (diff) |
hwconfig: Allow to use restricted env
During early boot phase GD_FLG_ENV_READY is not set but env_get() may work
when env is ready in restricted mode. Do not fail with error message
"WARNING: Calling __hwconfig without a buffer and before environment is ready"
when env is already working by checking for ENV_VALID flag.
Signed-off-by: Pali Rohár <pali@kernel.org>
Diffstat (limited to 'common')
-rw-r--r-- | common/hwconfig.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/hwconfig.c b/common/hwconfig.c index 43566b81bd4..cac0b6348f4 100644 --- a/common/hwconfig.c +++ b/common/hwconfig.c @@ -78,7 +78,7 @@ static const char *__hwconfig(const char *opt, size_t *arglen, /* if we are passed a buffer use it, otherwise try the environment */ if (!env_hwconfig) { - if (!(gd->flags & GD_FLG_ENV_READY)) { + if (!(gd->flags & GD_FLG_ENV_READY) && gd->env_valid != ENV_VALID) { printf("WARNING: Calling __hwconfig without a buffer " "and before environment is ready\n"); return NULL; |