diff options
author | Leon Romanovsky <leonro@mellanox.com> | 2019-06-12 15:27:41 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2019-06-20 14:37:02 -0400 |
commit | a49b1dc7ae447d7085360cd587fc1c8b9ec6c871 (patch) | |
tree | ff57360fc555422af427cd1e4d1061e30fb0db75 /drivers/infiniband/core | |
parent | 8d18ad83f19b7fb67485f977a51408287e3f801f (diff) |
RDMA: Convert destroy_wq to be void
All callers of destroy WQ are always success and there is no need
to check their return value, so convert destroy_wq to be void.
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/core')
-rw-r--r-- | drivers/infiniband/core/verbs.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c index 588f1d195fd2..16ef8a9bda4c 100644 --- a/drivers/infiniband/core/verbs.c +++ b/drivers/infiniband/core/verbs.c @@ -2235,19 +2235,17 @@ EXPORT_SYMBOL(ib_create_wq); */ int ib_destroy_wq(struct ib_wq *wq, struct ib_udata *udata) { - int err; struct ib_cq *cq = wq->cq; struct ib_pd *pd = wq->pd; if (atomic_read(&wq->usecnt)) return -EBUSY; - err = wq->device->ops.destroy_wq(wq, udata); - if (!err) { - atomic_dec(&pd->usecnt); - atomic_dec(&cq->usecnt); - } - return err; + wq->device->ops.destroy_wq(wq, udata); + atomic_dec(&pd->usecnt); + atomic_dec(&cq->usecnt); + + return 0; } EXPORT_SYMBOL(ib_destroy_wq); |