From: Li kunyu <kunyu@nfschina.com>
To: viro@zeniv.linux.org.uk, brauner@kernel.org,
ebiederm@xmission.com, keescook@chromium.org
Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, Li kunyu <kunyu@nfschina.com>
Subject: [PATCH] exec: Remove unnecessary ‘NULL’ values from mm
Date: Tue, 20 Feb 2024 13:32:25 +0800 [thread overview]
Message-ID: <20240220053225.63316-1-kunyu@nfschina.com> (raw)
mm is assigned first, so it does not need to initialize the assignment.
Signed-off-by: Li kunyu <kunyu@nfschina.com>
---
fs/exec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/exec.c b/fs/exec.c
index 10309a93d9c52..64046203bd5ea 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -369,7 +369,7 @@ static bool valid_arg_len(struct linux_binprm *bprm, long len)
static int bprm_mm_init(struct linux_binprm *bprm)
{
int err;
- struct mm_struct *mm = NULL;
+ struct mm_struct *mm;
bprm->mm = mm = mm_alloc();
err = -ENOMEM;
--
2.18.2
reply other threads:[~2024-02-20 5:32 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=20240220053225.63316-1-kunyu@nfschina.com \
--to=kunyu@nfschina.com \
--cc=brauner@kernel.org \
--cc=ebiederm@xmission.com \
--cc=keescook@chromium.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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®