Skip to contentSkip to conversation

kernel: relay: Remove unnecessary ‘NULL’ values from relay_open_buf

PATCH Applied Li kunyu 1 participant 1 message Jul 12, 2023 Relay

lore
Share & tools
lore

Li kunyu

author
#0 lore raw

PATCH 1/1 kernel: relay: Remove unnecessary ‘NULL’ values from relay_open_buf

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

---
 kernel/relay.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/relay.c +1 -1
index a80fa01042e9..83fe0325cde1 100644
@@ -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)
Signature · 1 line
2.18.2