rockchip: spl: ignore writing rollback index 0

Don't return failure to stop booting.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: If699019b588c400b1d37f1b77d02d5ccae4e68dc
This commit is contained in:
Joseph Chen 2020-07-07 15:33:51 +08:00 committed by Jianhong Chen
parent 31767fe77d
commit d5989feab2
1 changed files with 4 additions and 1 deletions

View File

@ -344,7 +344,10 @@ static int fit_write_otp_rollback_index(u32 fit_index)
struct udevice *dev;
u32 index, i, otp_index;
if (!fit_index || fit_index > OTP_UBOOT_ROLLBACK_WORDS * 32)
if (!fit_index)
return 0;
if (fit_index > OTP_UBOOT_ROLLBACK_WORDS * 32)
return -EINVAL;
dev = misc_otp_get_device(OTP_S);