With for(i = 0; i < n; i++) { ... } i reaches n. Signed-off-by: Roel Kluin <roel.kluin@xxxxxxxxx> --- diff --git a/drivers/acpi/processor_throttling.c b/drivers/acpi/processor_throttling.c index d278381..6feb9ab 100644 --- a/drivers/acpi/processor_throttling.c +++ b/drivers/acpi/processor_throttling.c @@ -785,7 +785,7 @@ static int acpi_get_throttling_state(struct acpi_processor *pr, if (tx->control == value) break; } - if (i > pr->throttling.state_count) + if (i >= pr->throttling.state_count) i = -1; return i; } -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html