]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
env: nvram: Let generic env_init() assign default environment
authorMarek Behún <marek.behun@nic.cz>
Fri, 22 Oct 2021 13:47:16 +0000 (15:47 +0200)
committerSimon Glass <sjg@chromium.org>
Sun, 31 Oct 2021 18:26:44 +0000 (12:26 -0600)
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@nic.cz>
Reviewed-by: Simon Glass <sjg@chromium.org>
env/nvram.c

index 261b31edfbb9303d8a8ffb9d07e322e0e003f30f..297573c4ed432b49fe6dc100e1d5c33fbb520269 100644 (file)
@@ -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;