staging: lustre: lnet: remove null check before kfree
PATCH 1/1 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 <[email protected]>
--- drivers/staging/lustre/lnet/lnet/lib-move.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/lustre/lnet/lnet/lib-move.c +1 -2
@@ -2146,8 +2146,7 @@ lnet_create_reply_msg(struct lnet_ni *ni, struct lnet_msg *getmsg) the_lnet.ln_counters[cpt]->drop_length += getmd->md_length;lnet_net_unlock (cpt); -if (msg) -kfree (msg); +kfree (msg);return NULL ; }
Signature · 6 lines
2.7.4 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel