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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20231228031750.12941-1-kunyu@nfschina.com>
Date: Thu, 28 Dec 2023 11:17:50 +0800
From: Li kunyu <kunyu@...china.com>
To: tglx@...utronix.de,
	peterz@...radead.org
Cc: linux-kernel@...r.kernel.org,
	Li kunyu <kunyu@...china.com>
Subject: [PATCH] kernel: cpu: Remove unnecessary ‘0’ values from ret

The ret variable is assigned when it does not need to be defined, as it
has already been assigned before use.

Signed-off-by: Li kunyu <kunyu@...china.com>
---
 kernel/cpu.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/cpu.c b/kernel/cpu.c
index 6de7c6bb74eee..c1f331ddf0dc7 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -998,7 +998,7 @@ static int cpuhp_up_callbacks(unsigned int cpu, struct cpuhp_cpu_state *st,
 			      enum cpuhp_state target)
 {
 	enum cpuhp_state prev_state = st->state;
-	int ret = 0;
+	int ret;
 
 	ret = cpuhp_invoke_callback_range(true, cpu, st, target);
 	if (ret) {
@@ -1402,7 +1402,7 @@ static int cpuhp_down_callbacks(unsigned int cpu, struct cpuhp_cpu_state *st,
 				enum cpuhp_state target)
 {
 	enum cpuhp_state prev_state = st->state;
-	int ret = 0;
+	int ret;
 
 	ret = cpuhp_invoke_callback_range(false, cpu, st, target);
 	if (ret) {
@@ -2488,7 +2488,7 @@ int __cpuhp_setup_state_cpuslocked(enum cpuhp_state state,
 				   int (*teardown)(unsigned int cpu),
 				   bool multi_instance)
 {
-	int cpu, ret = 0;
+	int cpu, ret;
 	bool dynstate;
 
 	lockdep_assert_cpus_held();
-- 
2.18.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ