[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20231101084118.6954-1-kunyu@nfschina.com>
Date: Wed, 1 Nov 2023 16:41:18 +0800
From: Li kunyu <kunyu@...china.com>
To: brauner@...nel.org, viro@...iv.linux.org.uk, dwindsor@...il.com,
keescook@...omium.org, elena.reshetova@...el.com
Cc: linux-kernel@...r.kernel.org, Li kunyu <kunyu@...china.com>
Subject: [PATCH] nsproxy: Remove unnecessary ‘0’ values from ret
The ret variable can be defined without assigning a value, as it is
assigned before use.
Signed-off-by: Li kunyu <kunyu@...china.com>
---
kernel/nsproxy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/nsproxy.c b/kernel/nsproxy.c
index 15781acaac1ce..b7e398d954b09 100644
--- a/kernel/nsproxy.c
+++ b/kernel/nsproxy.c
@@ -374,12 +374,12 @@ static inline int validate_ns(struct nsset *nsset, struct ns_common *ns)
*/
static int validate_nsset(struct nsset *nsset, struct pid *pid)
{
- int ret = 0;
unsigned flags = nsset->flags;
struct user_namespace *user_ns = NULL;
struct pid_namespace *pid_ns = NULL;
struct nsproxy *nsp;
struct task_struct *tsk;
+ int ret;
/* Take a "snapshot" of the target task's namespaces. */
rcu_read_lock();
--
2.18.2
Powered by blists - more mailing lists