Fix the issue in commit
591dbad ("env: mcc: Drop unnecessary #ifdefs")
If CONFIG_SYS_REDUNDAND_ENVIRONMENT is not defined, the offset value
becomes undetermined, so write env to unexpected offset.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
if (ret)
goto fini;
}
+ }
- if (mmc_get_env_addr(mmc, copy, &offset)) {
- ret = 1;
- goto fini;
- }
+ if (mmc_get_env_addr(mmc, copy, &offset)) {
+ ret = 1;
+ goto fini;
}
printf("Writing to %sMMC(%d)... ", copy ? "redundant " : "", dev);