From: Bhumika Goyal Date: Sun, 14 Feb 2016 15:04:28 +0000 (+0530) Subject: Staging: rdma: hfi1: Delete NULL check before vfree X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=a4d7d05b2da6afc5054cf3065084bda5751e5deb;p=linux.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rdma/hfi1/user_sdma.c b/drivers/staging/rdma/hfi1/user_sdma.c index d3de771a07708..4f55950605011 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; }