diff options
author | Leon Romanovsky <leonro@mellanox.com> | 2019-05-28 14:37:28 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2019-06-11 16:17:10 -0400 |
commit | a52c8e2469c30cf7ac453d624aed9c168b23d1af (patch) | |
tree | 6e2b5b8f8d37a23f0ebe3630bb0fb1202e8d10f5 /drivers/infiniband/sw/rdmavt/cq.c | |
parent | 147b308e6a63a0572b750b1dc9b8b6fc33997e4b (diff) | |
download | lwn-a52c8e2469c30cf7ac453d624aed9c168b23d1af.tar.gz lwn-a52c8e2469c30cf7ac453d624aed9c168b23d1af.zip |
RDMA: Clean destroy CQ in drivers do not return errors
Like all other destroy commands, .destroy_cq() call is not supposed
to fail. In all flows, the attempt to return earlier caused to memory
leaks.
This patch converts .destroy_cq() to do not return any errors.
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Acked-by: Gal Pressman <galpress@amazon.com>
Acked-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/sw/rdmavt/cq.c')
-rw-r--r-- | drivers/infiniband/sw/rdmavt/cq.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/infiniband/sw/rdmavt/cq.c b/drivers/infiniband/sw/rdmavt/cq.c index a06e6da7a026..8e76036fad4a 100644 --- a/drivers/infiniband/sw/rdmavt/cq.c +++ b/drivers/infiniband/sw/rdmavt/cq.c @@ -300,10 +300,8 @@ done: * @udata: user data or NULL for kernel object * * Called by ib_destroy_cq() in the generic verbs code. - * - * Return: always 0 */ -int rvt_destroy_cq(struct ib_cq *ibcq, struct ib_udata *udata) +void rvt_destroy_cq(struct ib_cq *ibcq, struct ib_udata *udata) { struct rvt_cq *cq = ibcq_to_rvtcq(ibcq); struct rvt_dev_info *rdi = cq->rdi; @@ -317,8 +315,6 @@ int rvt_destroy_cq(struct ib_cq *ibcq, struct ib_udata *udata) else vfree(cq->queue); kfree(cq); - - return 0; } /** |