mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] kernel: relay: Remove unnecessary ‘NULL’ values from relay_open_buf
@ 2023-07-13 23:44 Li kunyu
  0 siblings, 0 replies; only message in thread
From: Li kunyu @ 2023-07-13 23:44 UTC (permalink / raw)
  To: akpm, zhou.kete, rppt, mgorman, zhao_lei1, zhang.zhengming,
	surenb, xu.panda, wuchi.zero, Ilia.Gavrilov
  Cc: linux-kernel, Li kunyu

buf is assigned first, so it does not need to initialize the assignment.

Signed-off-by: Li kunyu <kunyu@nfschina.com>
---
 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)
-- 
2.18.2


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-07-12  7:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-13 23:44 [PATCH] kernel: relay: Remove unnecessary ‘NULL’ values from relay_open_buf Li kunyu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®