lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <72f31d34-3efd-346d-1738-a57dea9df710@users.sourceforge.net>
Date:   Sat, 10 Sep 2016 11:44:01 +0200
From:   SF Markus Elfring <elfring@...rs.sourceforge.net>
To:     linux-acpi@...r.kernel.org, Len Brown <lenb@...nel.org>,
        "Rafael J. Wysocki" <rjw@...ysocki.net>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org,
        Julia Lawall <julia.lawall@...6.fr>,
        Paolo Bonzini <pbonzini@...hat.com>
Subject: [PATCH 06/30] ACPI-processor: Move a success indication in
 acpi_processor_preregister_performance()

From: Markus Elfring <elfring@...rs.sourceforge.net>
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@...rs.sourceforge.net>
---
 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ