diff options
author | Tuukka Tikkanen <tuukka.tikkanen@linaro.org> | 2015-01-13 19:36:08 +0200 |
---|---|---|
committer | Tuukka Tikkanen <tuukka.tikkanen@linaro.org> | 2015-01-13 19:36:08 +0200 |
commit | b67b73da9fa327f25a7855a2773afa74e8870255 (patch) | |
tree | ed0ea835c3a26b2841549bde697e20f0dbd8772f | |
parent | 11e7cd17f1744922412c82210744b67289b74e9f (diff) |
Topology: Fix loop bound
The c-state information copy loop in create_states() should iterate
from 0 to MAXCSTATE-1 instead of 0 to MAXCSTATE. This patch replaces
the upper bound comparison operator <= with < to fix this.
Reported-by: Coverity Scan <scan-admin@coverity.com>
Signed-off-by: Tuukka Tikkanen <tuukka.tikkanen@linaro.org>
-rw-r--r-- | topology.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -693,7 +693,7 @@ static struct cpuidle_cstates *create_states(struct cpuidle_cstate *s_state) /* Copy state information */ d_state = result->cstate; - for (i = 0; i <= MAXCSTATE; ++d_state, ++s_state, ++i) { + for (i = 0; i < MAXCSTATE; ++d_state, ++s_state, ++i) { if (s_state->name == NULL) continue; |