summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/processor_perflib.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2021-03-05 19:40:36 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2021-03-08 19:06:51 +0100
commit2c25fabdd5f69fb3d33b052dbb21c4d2d9ae4308 (patch)
treec2a67de478ea3c62681ee54b67f1774226bac981 /drivers/acpi/processor_perflib.c
parentACPI: processor: Get rid of ACPICA message printing (diff)
downloadlinux-2c25fabdd5f69fb3d33b052dbb21c4d2d9ae4308.tar.xz
linux-2c25fabdd5f69fb3d33b052dbb21c4d2d9ae4308.zip
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>
Diffstat (limited to '')
-rw-r--r--drivers/acpi/processor_perflib.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c
index e4032b7c3133..686b23fb968c 100644
--- a/drivers/acpi/processor_perflib.c
+++ b/drivers/acpi/processor_perflib.c
@@ -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.
*/
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;
- if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
- acpi_handle_warn(pr->handle, "_PPC evaluation failed: %s\n",
- acpi_format_exception(status));
- return -ENODEV;
+ if (ACPI_FAILURE(status)) {
+ acpi_handle_warn(pr->handle,
+ "_PPC evaluation failed: %s\n",
+ acpi_format_exception(status));
+ return -ENODEV;
+ }
}
pr_debug("CPU %d: _PPC is %d - frequency %s limited\n", pr->id,