diff options
-rw-r--r-- | drivers/acpi/processor_idle.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 07c7d216c89d..f7ca8c55956b 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c | |||
@@ -1030,6 +1030,9 @@ static int acpi_processor_setup_cpuidle(struct acpi_processor *pr) | |||
1030 | dev->states[i].desc[0] = '\0'; | 1030 | dev->states[i].desc[0] = '\0'; |
1031 | } | 1031 | } |
1032 | 1032 | ||
1033 | if (max_cstate == 0) | ||
1034 | max_cstate = 1; | ||
1035 | |||
1033 | for (i = 1; i < ACPI_PROCESSOR_MAX_POWER && i <= max_cstate; i++) { | 1036 | for (i = 1; i < ACPI_PROCESSOR_MAX_POWER && i <= max_cstate; i++) { |
1034 | cx = &pr->power.states[i]; | 1037 | cx = &pr->power.states[i]; |
1035 | state = &dev->states[count]; | 1038 | state = &dev->states[count]; |