fs: exec: Remove unnecessary ‘NULL’ values from mm

Message ID 20231205014612.99243-1-kunyu@nfschina.com
State New
Headers
Series fs: exec: Remove unnecessary ‘NULL’ values from mm |

Commit Message

Li kunyu Dec. 5, 2023, 1:46 a.m. UTC
  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(-)
  

Patch

diff --git a/fs/exec.c b/fs/exec.c
index 6518e33ea813c..b01d2d40ace03 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -368,7 +368,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;