summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorSumit Pundir <pundirsumit11@gmail.com>2018-01-20 13:39:36 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-01-22 11:40:49 +0100
commita81200b5acb30460163f5b2ce393e54d6445fd5d (patch)
tree1f706e2ecf77cf1ba8aa42da5bc24d4d9633bb4e /drivers/staging
parent142ad642cde315764c4d8589fc0ed5bf67a712e9 (diff)
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>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/lustre/lnet/lnet/lib-move.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/lustre/lnet/lnet/lib-move.c b/drivers/staging/lustre/lnet/lnet/lib-move.c
index d724c4c73ecc..c673037dbce4 100644
--- a/drivers/staging/lustre/lnet/lnet/lib-move.c
+++ b/drivers/staging/lustre/lnet/lnet/lib-move.c
@@ -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;
}