Skip to contentSkip to conversation

kernel: cpu: Remove unnecessary ‘0’ values from err

PATCH New Li kunyu 1 participant 1 message Dec 28, 2023 CPU hotplug

lore
Share & tools
lore

Li kunyu

author
#0 lore raw

PATCH 1/1 kernel: cpu: Remove unnecessary ‘0’ values from err

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

---
 kernel/cpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/cpu.c +1 -1
index c1f331ddf0dc7..bea9cd176449e 100644
@@ -1720,7 +1720,7 @@ static int _cpu_up(unsigned int cpu, int tasks_frozen, enum cpuhp_state target)
 
 static int cpu_up(unsigned int cpu, enum cpuhp_state target)
 {
-	int err = 0;
+	int err;
 
 	if (!cpu_possible(cpu)) {
 		pr_err("can't online cpu %d because it is not configured as may-hotadd at boot time\n",
Signature · 1 line
2.18.2