aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/uverbs_std_types_counters.c
diff options
context:
space:
mode:
authorLeon Romanovsky <leonro@mellanox.com>2020-09-07 15:09:21 +0300
committerJason Gunthorpe <jgg@nvidia.com>2020-09-09 14:14:29 -0300
commit71ff3f6268644783d556fab10066f1027030135f (patch)
tree109f34c4fca9d8247dff18e3e2c9966838ffb764 /drivers/infiniband/core/uverbs_std_types_counters.c
parentRDMA: Restore ability to return error for destroy WQ (diff)
downloadlinux-dev-71ff3f6268644783d556fab10066f1027030135f.tar.xz
linux-dev-71ff3f6268644783d556fab10066f1027030135f.zip
RDMA: Make counters destroy symmetrical
Change counters to return failure like any other verbs destroy, however this flow shouldn't return error at all. Link: https://lore.kernel.org/r/20200907120921.476363-10-leon@kernel.org Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/core/uverbs_std_types_counters.c')
-rw-r--r--drivers/infiniband/core/uverbs_std_types_counters.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/infiniband/core/uverbs_std_types_counters.c b/drivers/infiniband/core/uverbs_std_types_counters.c
index c7e7438752bc..b3c6c066b601 100644
--- a/drivers/infiniband/core/uverbs_std_types_counters.c
+++ b/drivers/infiniband/core/uverbs_std_types_counters.c
@@ -46,7 +46,9 @@ static int uverbs_free_counters(struct ib_uobject *uobject,
if (ret)
return ret;
- counters->device->ops.destroy_counters(counters);
+ ret = counters->device->ops.destroy_counters(counters);
+ if (ret)
+ return ret;
kfree(counters);
return 0;
}