From: Li kunyu <kunyu@nfschina.com>
To: brauner@kernel.org, viro@zeniv.linux.org.uk, dwindsor@gmail.com,
keescook@chromium.org, elena.reshetova@intel.com
Cc: linux-kernel@vger.kernel.org, Li kunyu <kunyu@nfschina.com>
Subject: [PATCH] nsproxy: Remove unnecessary ‘0’ values from ret
Date: Wed, 1 Nov 2023 16:41:18 +0800 [thread overview]
Message-ID: <20231101084118.6954-1-kunyu@nfschina.com> (raw)
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
reply other threads:[~2023-11-01 8:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231101084118.6954-1-kunyu@nfschina.com \
--to=kunyu@nfschina.com \
--cc=brauner@kernel.org \
--cc=dwindsor@gmail.com \
--cc=elena.reshetova@intel.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®