Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Li kunyu and committed by
Andrew Morton
598f0046 95d1fef5

+1 -1
+1 -1
kernel/relay.c
··· 375 375 */ 376 376 static struct rchan_buf *relay_open_buf(struct rchan *chan, unsigned int cpu) 377 377 { 378 - struct rchan_buf *buf = NULL; 378 + struct rchan_buf *buf; 379 379 struct dentry *dentry; 380 380 381 381 if (chan->is_global)