
22 Oct
2010
22 Oct
'10
12:20 p.m.
In env_relocate_spec(), env_flash is freed and set to NULL if CONFIG_ENV_OFFSET_REDUND is undefined. This leads to an "Environment SPI flash not initialized" error when performing a saveenv.
br, Oliver
diff --git a/common/env_sf.c b/common/env_sf.c index fb0c39b..fc5f9f3 100644 --- a/common/env_sf.c +++ b/common/env_sf.c @@ -384,7 +384,10 @@ void env_relocate_spec(void) ret = env_import(buf, 1);
if (ret) + { gd->env_valid = 1; + return; + } out: spi_flash_free(env_flash); env_flash = NULL;