diff options
author | Ye Li <ye.li@nxp.com> | 2023-01-31 14:41:58 +0800 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-02-06 17:10:15 -0500 |
commit | ccd0542ab2607228c8e434e2875b014f9bba49f8 (patch) | |
tree | 7aca6c40b4a4da85a6f0c3d65c5fe86d36cb592d /env | |
parent | 94a51af409bc2a624315004468a898be9644e2ec (diff) | |
download | u-boot-ccd0542ab2607228c8e434e2875b014f9bba49f8.tar.gz u-boot-ccd0542ab2607228c8e434e2875b014f9bba49f8.tar.bz2 u-boot-ccd0542ab2607228c8e434e2875b014f9bba49f8.zip |
env: mmc: Fix offset issue for env save
Fix the issue in commit 46c9016 ("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>
Diffstat (limited to 'env')
-rw-r--r-- | env/mmc.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -273,11 +273,11 @@ static int env_mmc_save(void) 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); |