From: Li zeming Date: Mon, 15 Jan 2024 06:25:19 +0000 (+0800) Subject: user_namespace: remove unnecessary NULL values from kbuf X-Git-Tag: v6.9-rc1~106^2~61 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6db9d317833dd89d666ca0373c7b60f413bca9eb;p=thirdparty%2Flinux.git 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 Cc: Randy Dunlap Signed-off-by: Andrew Morton --- diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c index ce4d99df5f0eb..0b0b95418b16a 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 */