[PATCH 05/14] env: nvram: Let generic env_init() assign default environment

Marek Behún kabel at kernel.org
Fri Oct 22 15:47:16 CEST 2021


From: Marek Behún <marek.behun at nic.cz>

env_nvram_init() assigns default environment if ENV_INVALID, but this is
done in the generic env_init() function, which calls this initializer,
so drop it from here.

Signed-off-by: Marek Behún <marek.behun at nic.cz>
---
 env/nvram.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/env/nvram.c b/env/nvram.c
index 261b31edfb..297573c4ed 100644
--- a/env/nvram.c
+++ b/env/nvram.c
@@ -94,8 +94,7 @@ static int env_nvram_init(void)
 #endif
 		gd->env_valid = ENV_VALID;
 	} else {
-		gd->env_addr	= (ulong)&default_environment[0];
-		gd->env_valid	= ENV_INVALID;
+		gd->env_valid = ENV_INVALID;
 	}
 
 	return 0;
-- 
2.32.0



More information about the U-Boot mailing list