lkml.org 
[lkml]   [2021]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH][next] coredump: Remove redundant initialization of variable core_waiters
Date
From: Colin Ian King <colin.king@canonical.com>

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")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
fs/coredump.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/coredump.c b/fs/coredump.c
index a6b3c196cdef..2f79f8f7bd56 100644
--- a/fs/coredump.c
+++ b/fs/coredump.c
@@ -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;
--
2.32.0
\
 
 \ /
  Last update: 2021-10-11 15:17    [W:0.043 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site