diff options
author | Leon Romanovsky <leonro@mellanox.com> | 2019-05-28 13:37:28 +0200 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2019-06-11 22:17:10 +0200 |
commit | a52c8e2469c30cf7ac453d624aed9c168b23d1af (patch) | |
tree | 6e2b5b8f8d37a23f0ebe3630bb0fb1202e8d10f5 /drivers/infiniband/hw/mthca | |
parent | RDMA/nes: Avoid memory allocation during CQ destroy (diff) | |
download | linux-a52c8e2469c30cf7ac453d624aed9c168b23d1af.tar.xz linux-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/hw/mthca')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_provider.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_provider.c b/drivers/infiniband/hw/mthca/mthca_provider.c index b128ff76f709..81fc04e1c142 100644 --- a/drivers/infiniband/hw/mthca/mthca_provider.c +++ b/drivers/infiniband/hw/mthca/mthca_provider.c @@ -804,7 +804,7 @@ out: return ret; } -static int mthca_destroy_cq(struct ib_cq *cq, struct ib_udata *udata) +static void mthca_destroy_cq(struct ib_cq *cq, struct ib_udata *udata) { if (udata) { struct mthca_ucontext *context = @@ -824,8 +824,6 @@ static int mthca_destroy_cq(struct ib_cq *cq, struct ib_udata *udata) } mthca_free_cq(to_mdev(cq->device), to_mcq(cq)); kfree(cq); - - return 0; } static inline u32 convert_access(int acc) |