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

staging: lustre: lnet: remove null check before kfree

Since kfree(NULL) is safe there is no need to place a check before it.
Issue reported by checkpatch.pl

Signed-off-by: Sumit Pundir <pundirsumit11@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Sumit Pundir and committed by
Greg Kroah-Hartman
a81200b5 142ad642

+1 -2
+1 -2
drivers/staging/lustre/lnet/lnet/lib-move.c
··· 2146 2146 the_lnet.ln_counters[cpt]->drop_length += getmd->md_length; 2147 2147 lnet_net_unlock(cpt); 2148 2148 2149 - if (msg) 2150 - kfree(msg); 2149 + kfree(msg); 2151 2150 2152 2151 return NULL; 2153 2152 }