Commit 53af9cfb authored by Len Brown's avatar Len Brown Committed by Len Brown

ACPI: get_throttling_state() cannot be larger than state_count

Reported-by: default avatarRoel Kluin <roel.kluin@gmail.com>
Acked-by: default avatarZhao Yakui <yakui.zhao@intel.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 2a9ef8e1
......@@ -783,11 +783,9 @@ static int acpi_get_throttling_state(struct acpi_processor *pr,
(struct acpi_processor_tx_tss *)&(pr->throttling.
states_tss[i]);
if (tx->control == value)
break;
}
if (i > pr->throttling.state_count)
i = -1;
return i;
}
return -1;
}
static int acpi_get_throttling_value(struct acpi_processor *pr,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment