[PATCH 06/30] ACPI-processor: Move a success indication in acpi_processor_preregister_performance()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 6 Sep 2016 13:03:56 +0200

The local variable "retval" was initialised with a zero at the beginning
as an indication for a successful function execution despite of
the possibility that following function calls could fail.
Move the desired assignment down to the source code place where some system
clean-up is performed.

Signed-off-by: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
---
 drivers/acpi/processor_perflib.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c
index 2fc82e7..417e181 100644
--- a/drivers/acpi/processor_perflib.c
+++ b/drivers/acpi/processor_perflib.c
@@ -595,7 +595,7 @@ int acpi_processor_preregister_performance(
 		struct acpi_processor_performance __percpu *performance)
 {
 	int count_target;
-	int retval = 0;
+	int retval;
 	unsigned int i, j;
 	cpumask_var_t covered_cpus;
 	struct acpi_processor *pr;
@@ -719,6 +719,8 @@ int acpi_processor_preregister_performance(
 				     pr->performance->shared_cpu_map);
 		}
 	}
+
+	retval = 0;
  clear_cpu:
 	for_each_possible_cpu(i) {
 		pr = per_cpu(processors, i);
-- 
2.10.0

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux