diff options
author | Sumit Pundir <pundirsumit11@gmail.com> | 2018-01-20 13:39:36 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-01-22 11:40:49 +0100 |
commit | a81200b5acb30460163f5b2ce393e54d6445fd5d (patch) | |
tree | 1f706e2ecf77cf1ba8aa42da5bc24d4d9633bb4e /drivers/staging/lustre | |
parent | 142ad642cde315764c4d8589fc0ed5bf67a712e9 (diff) | |
download | linux-stable-a81200b5acb30460163f5b2ce393e54d6445fd5d.tar.gz linux-stable-a81200b5acb30460163f5b2ce393e54d6445fd5d.tar.bz2 linux-stable-a81200b5acb30460163f5b2ce393e54d6445fd5d.zip |
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/lustre')
-rw-r--r-- | drivers/staging/lustre/lnet/lnet/lib-move.c | 3 |
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; } |