Skip to content

Commit

Permalink
IB/mlx5: Simplify mlx5_ib_destroy_srq
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eli Cohen authored and Roland Dreier committed Nov 8, 2013
1 parent 9641b74 commit 1faacf8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/infiniband/hw/mlx5/srq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 1faacf8

Please sign in to comment.