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>
This commit is contained in:
Li zeming 2024-01-15 14:25:19 +08:00 committed by Andrew Morton
parent f9436a5d04
commit 6db9d31783

View File

@ -931,7 +931,7 @@ static ssize_t map_write(struct file *file, const char __user *buf,
struct uid_gid_map new_map; struct uid_gid_map new_map;
unsigned idx; unsigned idx;
struct uid_gid_extent extent; struct uid_gid_extent extent;
char *kbuf = NULL, *pos, *next_line; char *kbuf, *pos, *next_line;
ssize_t ret; ssize_t ret;
/* Only allow < page size writes at the beginning of the file */ /* Only allow < page size writes at the beginning of the file */