mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-02-17 14:38:58 +00:00
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>
This commit is contained in:
parent
94a51af409
commit
ccd0542ab2
1 changed files with 4 additions and 4 deletions
8
env/mmc.c
vendored
8
env/mmc.c
vendored
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue