mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] fs: exec: Remove unnecessary ‘NULL’ values from vma
@ 2023-12-05  1:51 Li kunyu
  0 siblings, 0 replies; only message in thread
From: Li kunyu @ 2023-12-05  1:51 UTC (permalink / raw)
  To: viro, brauner, ebiederm, keescook
  Cc: linux-fsdevel, linux-mm, linux-kernel, Li kunyu

vma 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 b01d2d40ace03..cae37330e7442 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -253,7 +253,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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-12-05  1:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-05  1:51 [PATCH] fs: exec: Remove unnecessary ‘NULL’ values from vma 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®