From: Li zeming <zeming@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 zeming <zeming@nfschina.com>
Subject: [PATCH] exec: Remove unnecessary ‘NULL’ values from vma
Date: Tue, 20 Feb 2024 13:18:30 +0800 [thread overview]
Message-ID: <20240220051830.61099-1-zeming@nfschina.com> (raw)
vma is assigned first, so it does not need to initialize the
assignment.
Signed-off-by: Li zeming <zeming@nfschina.com>
---
fs/exec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/exec.c b/fs/exec.c
index af4fbb61cd53e..7be0527f5ff25 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -254,7 +254,7 @@ static void flush_arg_page(struct linux_binprm *bprm, unsigned long pos,
static int __bprm_mm_init(struct linux_binprm *bprm)
{
int err;
- struct vm_area_struct *vma = NULL;
+ struct vm_area_struct *vma;
struct mm_struct *mm = bprm->mm;
bprm->vma = vma = vm_area_alloc(mm);
--
2.18.2
next reply other threads:[~2024-02-20 5:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-20 5:18 Li zeming [this message]
2024-02-24 1:04 ` [PATCH] exec: Remove unnecessary ‘NULL’ values from vma Kees Cook
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=20240220051830.61099-1-zeming@nfschina.com \
--to=zeming@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.