Skip to content

Commit 6db9d31

Browse files
Li zemingakpm00
Li zeming
authored andcommitted
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/20240115062519.31298-1-zeming@nfschina.com Signed-off-by: Li zeming <zeming@nfschina.com> Cc: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent f9436a5 commit 6db9d31

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/user_namespace.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -931,7 +931,7 @@ static ssize_t map_write(struct file *file, const char __user *buf,
931931
struct uid_gid_map new_map;
932932
unsigned idx;
933933
struct uid_gid_extent extent;
934-
char *kbuf = NULL, *pos, *next_line;
934+
char *kbuf, *pos, *next_line;
935935
ssize_t ret;
936936

937937
/* Only allow < page size writes at the beginning of the file */

0 commit comments

Comments
 (0)