aboutsummaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorLi zeming <[email protected]>2024-01-15 14:25:19 +0800
committerAndrew Morton <[email protected]>2024-02-22 15:38:52 -0800
commit6db9d317833dd89d666ca0373c7b60f413bca9eb (patch)
tree70c7e2bc3d0b7dd44bcb9b89f14b4394bbe27911 /kernel
parentf9436a5d0497f759330d07e1189565edd4456be8 (diff)
user_namespace: remove unnecessary NULL values from kbuf
kbuf is assigned first, so it does not need to initialize the assignment. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Li zeming <[email protected]> Cc: Randy Dunlap <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/user_namespace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c
index ce4d99df5f0e..0b0b95418b16 100644
--- a/kernel/user_namespace.c
+++ b/kernel/user_namespace.c
@@ -931,7 +931,7 @@ static ssize_t map_write(struct file *file, const char __user *buf,
struct uid_gid_map new_map;
unsigned idx;
struct uid_gid_extent extent;
- char *kbuf = NULL, *pos, *next_line;
+ char *kbuf, *pos, *next_line;
ssize_t ret;
/* Only allow < page size writes at the beginning of the file */