[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8150213.T7Z3S40VBb@kreacher>
Date: Mon, 05 Dec 2022 20:05:55 +0100
From: "Rafael J. Wysocki" <rjw@...ysocki.net>
To: Linux ACPI <linux-acpi@...r.kernel.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
Linux PM <linux-pm@...r.kernel.org>,
Zhang Rui <rui.zhang@...el.com>,
Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>
Subject: [PATCH v1 3/5] ACPI: processor: perflib: Rearrange unregistration routine
From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
Rearrange acpi_processor_unregister_performance() to follow a more
common error handling pattern and drop a redundant "return" statement
from the end of it.
No expected functional impact.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
---
drivers/acpi/processor_perflib.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
Index: linux-pm/drivers/acpi/processor_perflib.c
===================================================================
--- linux-pm.orig/drivers/acpi/processor_perflib.c
+++ linux-pm/drivers/acpi/processor_perflib.c
@@ -754,18 +754,15 @@ void acpi_processor_unregister_performan
mutex_lock(&performance_mutex);
pr = per_cpu(processors, cpu);
- if (!pr) {
- mutex_unlock(&performance_mutex);
- return;
- }
+ if (!pr)
+ goto unlock;
if (pr->performance)
kfree(pr->performance->states);
pr->performance = NULL;
+unlock:
mutex_unlock(&performance_mutex);
-
- return;
}
EXPORT_SYMBOL(acpi_processor_unregister_performance);
Powered by blists - more mailing lists