diff options
author | Bhumika Goyal <bhumirks@gmail.com> | 2016-02-14 16:04:28 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-02-15 01:44:06 +0100 |
commit | a4d7d05b2da6afc5054cf3065084bda5751e5deb (patch) | |
tree | c0c08b78f18fbbc3dbf72b4b99d21e50b2ee5771 | |
parent | Staging: rtl8188eu: os_dep: Remove NULL test before rtw_free_netdev (diff) | |
download | linux-a4d7d05b2da6afc5054cf3065084bda5751e5deb.tar.xz linux-a4d7d05b2da6afc5054cf3065084bda5751e5deb.zip |
Staging: rdma: hfi1: Delete NULL check before vfree
The function vfree test whether the argument is NULL and return
immediately. SO NULL test is not needed before vfree.
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/rdma/hfi1/user_sdma.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/rdma/hfi1/user_sdma.c b/drivers/staging/rdma/hfi1/user_sdma.c index d3de771a0770..4f5595060501 100644 --- a/drivers/staging/rdma/hfi1/user_sdma.c +++ b/drivers/staging/rdma/hfi1/user_sdma.c @@ -468,8 +468,7 @@ int hfi1_user_sdma_free_queues(struct hfi1_filedata *fd) fd->pq = NULL; } if (fd->cq) { - if (fd->cq->comps) - vfree(fd->cq->comps); + vfree(fd->cq->comps); kfree(fd->cq); fd->cq = NULL; } |