提交 53af9cfb 编写于 作者: L Len Brown 提交者: Len Brown

ACPI: get_throttling_state() cannot be larger than state_count

Reported-by: NRoel Kluin <roel.kluin@gmail.com>
Acked-by: NZhao Yakui <yakui.zhao@intel.com>
Signed-off-by: NLen Brown <len.brown@intel.com>
上级 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;
return i;
}
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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册