summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--env/sf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/env/sf.c b/env/sf.c
index 0e27a020643..14c35324e64 100644
--- a/env/sf.c
+++ b/env/sf.c
@@ -396,7 +396,8 @@ static int env_sf_init_early(void)
if (IS_ENABLED(CONFIG_ENV_REDUNDANT)) {
read2_fail = spi_flash_read(env_flash,
- CONFIG_ENV_OFFSET_REDUND,
+ IF_ENABLED_INT(CONFIG_ENV_REDUNDANT,
+ CONFIG_ENV_OFFSET_REDUND),
CONFIG_ENV_SIZE, tmp_env2);
ret = env_check_redund((char *)tmp_env1, read1_fail,
(char *)tmp_env2, read2_fail);