diff options
author | Li zeming <zeming@nfschina.com> | 2024-01-15 14:25:19 +0800 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2024-02-22 15:38:52 -0800 |
commit | 6db9d317833dd89d666ca0373c7b60f413bca9eb (patch) | |
tree | 70c7e2bc3d0b7dd44bcb9b89f14b4394bbe27911 /kernel/user_namespace.c | |
parent | f9436a5d0497f759330d07e1189565edd4456be8 (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/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>
Diffstat (limited to 'kernel/user_namespace.c')
-rw-r--r-- | kernel/user_namespace.c | 2 |
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 */ |