From bcec45798de05caa921e9bf00f13f567c39e1a91 Mon Sep 17 00:00:00 2001 From: Zain Wang Date: Mon, 28 Dec 2020 15:10:23 +0800 Subject: [PATCH] rockchip: board: Do not set unvalid index to rollback-index Signed-off-by: Zain Wang Change-Id: I2ba9c666c8375e02569518db9604d214c2a23b53 --- arch/arm/mach-rockchip/board.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/board.c index fc76d98b75..7cd020d9d7 100644 --- a/arch/arm/mach-rockchip/board.c +++ b/arch/arm/mach-rockchip/board.c @@ -882,9 +882,9 @@ int fit_read_otp_rollback_index(uint32_t fit_index, uint32_t *otp_index) *otp_index = fit_index; printf("Initial otp index as %d\n", fit_index); + } else { + *otp_index = index; } - - *otp_index = index; #else *otp_index = 0; #endif