summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorEli Cohen <eli@dev.mellanox.co.il>2013-10-23 09:53:16 +0300
committerRoland Dreier <roland@purestorage.com>2013-11-08 14:42:59 -0800
commit1faacf82dfb3e0027087ff7e6aae5e0643b98a4d (patch)
treebfbc563ef9827ddc9e0fb7eba178308c80b21075 /drivers/infiniband
parent9641b74ebee65320fa52172995d6df12b641caa5 (diff)
downloadblackbird-op-linux-1faacf82dfb3e0027087ff7e6aae5e0643b98a4d.tar.gz
blackbird-op-linux-1faacf82dfb3e0027087ff7e6aae5e0643b98a4d.zip
IB/mlx5: Simplify mlx5_ib_destroy_srq
Make use of destroy_srq_kernel() to clear SRQ resouces. Signed-off-by: Eli Cohen <eli@mellanox.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/mlx5/srq.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/mlx5/srq.c b/drivers/infiniband/hw/mlx5/srq.c
index 0aa478bc291a..f1e5845b42b0 100644
--- a/drivers/infiniband/hw/mlx5/srq.c
+++ b/drivers/infiniband/hw/mlx5/srq.c
@@ -390,9 +390,7 @@ int mlx5_ib_destroy_srq(struct ib_srq *srq)
mlx5_ib_db_unmap_user(to_mucontext(srq->uobject->context), &msrq->db);
ib_umem_release(msrq->umem);
} else {
- kfree(msrq->wrid);
- mlx5_buf_free(&dev->mdev, &msrq->buf);
- mlx5_db_free(&dev->mdev, &msrq->db);
+ destroy_srq_kernel(dev, msrq);
}
kfree(srq);
OpenPOWER on IntegriCloud