summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@mellanox.com>2018-12-20 16:39:26 -0700
committerJason Gunthorpe <jgg@mellanox.com>2018-12-20 20:49:31 -0700
commit623d154305c06c83924b8fd2afbfdeba3b396fb7 (patch)
tree5d7a9f073ce742255b8b2c83532003ef7b47aa6b /drivers/infiniband
parente7c4d8e6045171896d763c551b90c672fb5ab42b (diff)
downloadblackbird-op-linux-623d154305c06c83924b8fd2afbfdeba3b396fb7.tar.gz
blackbird-op-linux-623d154305c06c83924b8fd2afbfdeba3b396fb7.zip
IB/mlx5: Fix wrong error unwind
The destroy_workqueue on error unwind is missing, and the code jumps to the wrong exit label. Fixes: 813e90b1aeaa ("IB/mlx5: Add advise_mr() support") Acked-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/mlx5/main.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index 9b40ec73cc64..75edb0804358 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -5775,12 +5775,14 @@ int mlx5_ib_stage_init_init(struct mlx5_ib_dev *dev)
dev->advise_mr_wq = alloc_ordered_workqueue("mlx5_ib_advise_mr_wq", 0);
if (!dev->advise_mr_wq) {
err = -ENOMEM;
- goto err_free_port;
+ goto err_mp;
}
err = init_srcu_struct(&dev->mr_srcu);
- if (err)
- goto err_free_port;
+ if (err) {
+ destroy_workqueue(dev->advise_mr_wq);
+ goto err_mp;
+ }
#endif
return 0;
OpenPOWER on IntegriCloud