* [PATCH] nsproxy: Remove unnecessary ‘0’ values from ret
@ 2023-11-01 8:41 Li kunyu
0 siblings, 0 replies; only message in thread
From: Li kunyu @ 2023-11-01 8:41 UTC (permalink / raw)
To: brauner, viro, dwindsor, keescook, elena.reshetova; +Cc: linux-kernel, Li kunyu
The ret variable can be defined without assigning a value, as it is
assigned before use.
Signed-off-by: Li kunyu <kunyu@nfschina.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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-11-01 8:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-01 8:41 [PATCH] nsproxy: Remove unnecessary ‘0’ values from ret Li kunyu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®