diff options
author | Li zeming <zeming@nfschina.com> | 2024-01-15 07:25:19 +0100 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2024-02-23 00:38:52 +0100 |
commit | 6db9d317833dd89d666ca0373c7b60f413bca9eb (patch) | |
tree | 70c7e2bc3d0b7dd44bcb9b89f14b4394bbe27911 /kernel/user_namespace.c | |
parent | sysctl: allow to change limits for posix messages queues (diff) | |
download | linux-6db9d317833dd89d666ca0373c7b60f413bca9eb.tar.xz linux-6db9d317833dd89d666ca0373c7b60f413bca9eb.zip |
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 */ |