common: android: fix tries_remaining minus twice in avb & ab system

Change-Id: I422cb3c2f7e28849772a65b8060a0d8e26313d47
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
This commit is contained in:
Jason Zhu 2019-06-27 15:10:33 +08:00 committed by Jianhong Chen
parent c9289edddb
commit 87f9541a89
1 changed files with 5 additions and 1 deletions

View File

@ -675,7 +675,11 @@ static AvbSlotVerifyResult android_slot_verify(char *boot_partname,
}
out:
#ifdef CONFIG_ANDROID_AB
#if defined(CONFIG_ANDROID_AB) && !defined(CONFIG_ANDROID_AVB)
/*
* In ab & avb process, the tries_remaining minus one in function
* android_slot_verify, shield this function here.
*/
/* ... and decrement tries remaining, if applicable. */
if (!ab_data.slots[slot_index_to_boot].successful_boot &&
ab_data.slots[slot_index_to_boot].tries_remaining > 0) {