summaryrefslogtreecommitdiff
path: root/env
diff options
context:
space:
mode:
Diffstat (limited to 'env')
-rw-r--r--env/sf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/env/sf.c b/env/sf.c
index 22b70ad319..64c57f2cdf 100644
--- a/env/sf.c
+++ b/env/sf.c
@@ -305,7 +305,7 @@ U_BOOT_ENV_LOCATION(sf) = {
.location = ENVL_SPI_FLASH,
ENV_NAME("SPI Flash")
.load = env_sf_load,
- .save = ENV_SAVE_PTR(env_sf_save),
+ .save = CONFIG_IS_ENABLED(SAVEENV) ? ENV_SAVE_PTR(env_sf_save) : NULL,
#if defined(INITENV) && (CONFIG_ENV_ADDR != 0x0)
.init = env_sf_init,
#endif