Skip to contentSkip to conversation

Staging: rdma: hfi1: Delete NULL check before vfree

PATCH New Bhumika Goyal 1 participant 1 message Feb 14, 2016 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/staging/rdma/hfi1/user_sdma.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/rdma/hfi1/user_sdma.c +1 -2
index d3de771..4f55950 100644
@@ -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;
 	}
Signature · 1 line
1.9.1