Skip to contentSkip to conversation

coredump: Remove redundant initialization of variable core_waiters

PATCH In review Colin King 2 participants 2 messages Oct 11, 2021 – Oct 12, 2021

Subsystems (2)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 coredump: Remove redundant initialization of variable core_waiters

From: Colin Ian King <[email protected]>

The variable core_waiters is being initialized with a value that is never read, it is being updated later on. The assignment is redundant and can be removed.

Addresses-Coverity: ("Unused value")

---
 fs/coredump.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/coredump.c +1 -1
index a6b3c196cdef..2f79f8f7bd56 100644
@@ -390,7 +390,7 @@ static int zap_threads(struct task_struct *tsk,
 static int coredump_wait(int exit_code, struct core_state *core_state)
 {
 	struct task_struct *tsk = current;
-	int core_waiters = -EBUSY;
+	int core_waiters;
 
 	init_completion(&core_state->startup);
 	core_state->dumper.task = tsk;
Signature · 1 line
2.32.0