hwconfig: Allow to use restricted env
authorPali Rohár <pali@kernel.org>
Sun, 7 Aug 2022 19:06:04 +0000 (21:06 +0200)
committerTom Rini <trini@konsulko.com>
Sat, 20 Aug 2022 22:12:51 +0000 (18:12 -0400)
commita871af2d5a59c26d4ff7e60530a7afce0742e6f0
treeaab0e045090d47d91973c8cceeedf54b823e78bf
parentcc0b36536b8ffe89293930934439c8148afa075c
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>
common/hwconfig.c