forked from Minki/linux
ACPI: processor: perflib: Eliminate redundant status check
One of the "status != AE_NOT_FOUND" checks in acpi_processor_get_platform_limit() is redundant, so rearrange the code to eliminate it. No functional impact. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
52af99c3f5
commit
2c25fabdd5
@ -63,14 +63,15 @@ static int acpi_processor_get_platform_limit(struct acpi_processor *pr)
|
|||||||
* (e.g. 0 = states 0..n; 1 = states 1..n; etc.
|
* (e.g. 0 = states 0..n; 1 = states 1..n; etc.
|
||||||
*/
|
*/
|
||||||
status = acpi_evaluate_integer(pr->handle, "_PPC", NULL, &ppc);
|
status = acpi_evaluate_integer(pr->handle, "_PPC", NULL, &ppc);
|
||||||
|
if (status != AE_NOT_FOUND) {
|
||||||
if (status != AE_NOT_FOUND)
|
|
||||||
acpi_processor_ppc_in_use = true;
|
acpi_processor_ppc_in_use = true;
|
||||||
|
|
||||||
if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
|
if (ACPI_FAILURE(status)) {
|
||||||
acpi_handle_warn(pr->handle, "_PPC evaluation failed: %s\n",
|
acpi_handle_warn(pr->handle,
|
||||||
acpi_format_exception(status));
|
"_PPC evaluation failed: %s\n",
|
||||||
return -ENODEV;
|
acpi_format_exception(status));
|
||||||
|
return -ENODEV;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pr_debug("CPU %d: _PPC is %d - frequency %s limited\n", pr->id,
|
pr_debug("CPU %d: _PPC is %d - frequency %s limited\n", pr->id,
|
||||||
|
Loading…
Reference in New Issue
Block a user