summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenny Ho <hsiufangho@google.com>2024-04-10 14:42:45 +0800
committerSpade Lee <spadelee@google.com>2024-04-12 01:06:17 +0000
commitdfc81c31eea826a81203d3a03cac80d40ca19451 (patch)
tree17c2511faea62579c76fa979bd267ddf3b77eefc
parent46f2409572f47d1f7926c919058c0427394c57ed (diff)
downloadbms-android-gs-raviole-5.10-android15-beta.tar.gz
Bug: 333629531 Change-Id: I16f8b5259106b5f7dbfc7b16d896174d1a3fa206 Signed-off-by: Jenny Ho <hsiufangho@google.com> (cherry picked from commit 11a05eccc1df6e819bc4290ec0b06c64253bafeb)
-rw-r--r--google_bms.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/google_bms.c b/google_bms.c
index fc2f171..992da87 100644
--- a/google_bms.c
+++ b/google_bms.c
@@ -275,7 +275,7 @@ int gbms_aacr_fade10(const struct gbms_chg_profile *profile, int cycles)
if (profile->aacr_nb_limits == 0 || cycles < 0)
return -EINVAL;
- for (idx = 0; idx < profile->aacr_nb_limits; idx++)
+ for (idx = 0; idx < profile->aacr_nb_limits - 1; idx++)
if (cycles < profile->reference_cycles[idx])
break;