summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Lin <kylelin@google.com>2023-08-03 15:53:22 +0800
committerKyle Lin <kylelin@google.com>2023-08-04 10:34:37 +0800
commit08e120376cc5ffead105f4b5aaa57ab41024a8d3 (patch)
treeb3097d619bebddd02b9c1dbdc442e854146b4922
parent8f9ccf41f6af8d4d7beb0c5326d479d3a4f6cb69 (diff)
downloadgs-08e120376cc5ffead105f4b5aaa57ab41024a8d3.tar.gz
devfreq: add the bounds to avoid overflow
Bug: 292331536 Test: build and boot Change-Id: I6328e87544f870eaba8155f110aa1ed32eb94c57 Signed-off-by: Kyle Lin <kylelin@google.com>
-rw-r--r--drivers/devfreq/google/governor_simpleinteractive.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/devfreq/google/governor_simpleinteractive.c b/drivers/devfreq/google/governor_simpleinteractive.c
index bc36698c8..38970fd51 100644
--- a/drivers/devfreq/google/governor_simpleinteractive.c
+++ b/drivers/devfreq/google/governor_simpleinteractive.c
@@ -159,7 +159,7 @@ static unsigned int mif_to_int_freq(struct devfreq_alt_dvfs_data *alt_data,
if (!alt_data->mif_int_tbl)
return 0;
- for (i = 0; alt_data->map_row_cnt; i++) {
+ for (i = 0; i < alt_data->map_row_cnt; i++) {
if (freq > alt_data->mif_int_tbl[i].mif_freq)
break;
}