summaryrefslogtreecommitdiffstats
path: root/kernel/relay.c
diff options
context:
space:
mode:
authorLi kunyu <kunyu@nfschina.com>2023-07-14 01:44:59 +0200
committerAndrew Morton <akpm@linux-foundation.org>2023-08-18 19:18:55 +0200
commit598f0046e9c3cc31efe975edc326eeaafddcaf92 (patch)
tree447aa46f14c475e4f9f08ba7f1dd8103cc4ce6dc /kernel/relay.c
parentremove ARCH_DEFAULT_KEXEC from Kconfig.kexec (diff)
downloadlinux-598f0046e9c3cc31efe975edc326eeaafddcaf92.tar.xz
linux-598f0046e9c3cc31efe975edc326eeaafddcaf92.zip
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>
Diffstat (limited to 'kernel/relay.c')
-rw-r--r--kernel/relay.c2
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)