diff options
author | Li kunyu <kunyu@nfschina.com> | 2023-07-14 02:44:59 +0300 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2023-08-18 20:18:55 +0300 |
commit | 598f0046e9c3cc31efe975edc326eeaafddcaf92 (patch) | |
tree | 447aa46f14c475e4f9f08ba7f1dd8103cc4ce6dc | |
parent | 95d1fef53782eb409d4578ce6101d2a7b055351c (diff) | |
download | linux-598f0046e9c3cc31efe975edc326eeaafddcaf92.tar.xz |
kernel: relay: remove unnecessary NULL values from relay_open_buf
buf is assigned first, so it does not need to initialize the assignment.
Link: https://lkml.kernel.org/r/20230713234459.2908-1-kunyu@nfschina.com
Signed-off-by: Li kunyu <kunyu@nfschina.com>
Reviewed-by: Andrew Morton <akpm@linux-foudation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r-- | kernel/relay.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/relay.c b/kernel/relay.c index a80fa01042e9..83fe0325cde1 100644 --- a/kernel/relay.c +++ b/kernel/relay.c @@ -375,7 +375,7 @@ static struct dentry *relay_create_buf_file(struct rchan *chan, */ static struct rchan_buf *relay_open_buf(struct rchan *chan, unsigned int cpu) { - struct rchan_buf *buf = NULL; + struct rchan_buf *buf; struct dentry *dentry; if (chan->is_global) |