[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20231228032051.13440-1-kunyu@nfschina.com>
Date: Thu, 28 Dec 2023 11:20:51 +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 err
The err 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 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/cpu.c b/kernel/cpu.c
index c1f331ddf0dc7..bea9cd176449e 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -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",
--
2.18.2
Powered by blists - more mailing lists