From 598f0046e9c3cc31efe975edc326eeaafddcaf92 Mon Sep 17 00:00:00 2001 From: Li kunyu Date: Fri, 14 Jul 2023 07:44:59 +0800 Subject: [PATCH] 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 Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton --- kernel/relay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)