Skip to contentSkip to conversation

exec: Remove unnecessary ‘NULL’ values from mm

PATCH New Li kunyu 1 participant 1 message Feb 20, 2024

Subsystems (2)
lore
Share & tools
lore

Li kunyu

author
#0 lore raw

PATCH 1/1 exec: Remove unnecessary ‘NULL’ values from mm

mm is assigned first, so it does not need to initialize the assignment.

---
 fs/exec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/exec.c +1 -1
index 10309a93d9c52..64046203bd5ea 100644
@@ -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;
Signature · 1 line
2.18.2