From 87f9541a897790acf69f9c6ea8c600740649c91f Mon Sep 17 00:00:00 2001 From: Jason Zhu Date: Thu, 27 Jun 2019 15:10:33 +0800 Subject: [PATCH] common: android: fix tries_remaining minus twice in avb & ab system Change-Id: I422cb3c2f7e28849772a65b8060a0d8e26313d47 Signed-off-by: Jason Zhu --- common/android_bootloader.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common/android_bootloader.c b/common/android_bootloader.c index d7e497fa1b..20bbad5049 100644 --- a/common/android_bootloader.c +++ b/common/android_bootloader.c @@ -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) {