mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
cpuidle: teo: Fix intervals[] array indexing bug
commit 57388a2ccb6c2f554fee39772886c69b796dde53 upstream.
Fix a simple bug in rotating array index.
Fixes: b26bf6ab71 ("cpuidle: New timer events oriented governor for tickless systems")
Signed-off-by: Ikjoon Jang <[email protected]>
Cc: 5.1+ <[email protected]> # 5.1+
Signed-off-by: Rafael J. Wysocki <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
af2e7c923d
commit
55b256b4c7
1 changed files with 1 additions and 1 deletions
|
|
@ -194,7 +194,7 @@ static void teo_update(struct cpuidle_driver *drv, struct cpuidle_device *dev)
|
|||
* pattern detection.
|
||||
*/
|
||||
cpu_data->intervals[cpu_data->interval_idx++] = measured_us;
|
||||
if (cpu_data->interval_idx > INTERVALS)
|
||||
if (cpu_data->interval_idx >= INTERVALS)
|
||||
cpu_data->interval_idx = 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue