Staging: rdma: hfi1: Delete NULL check before vfree
authorBhumika Goyal <bhumirks@gmail.com>
Sun, 14 Feb 2016 15:04:28 +0000 (20:34 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 Feb 2016 00:44:06 +0000 (16:44 -0800)
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>
drivers/staging/rdma/hfi1/user_sdma.c

index d3de771a0770860b7cbc678654300cdd2a05e690..4f559506050117bd5933362e6d471ff5d5d1402a 100644 (file)
@@ -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;
        }