Commit 623d1543 authored by Jason Gunthorpe's avatar Jason Gunthorpe

IB/mlx5: Fix wrong error unwind

The destroy_workqueue on error unwind is missing, and the code jumps to
the wrong exit label.

Fixes: 813e90b1 ("IB/mlx5: Add advise_mr() support")
Acked-by: default avatarLeon Romanovsky <leonro@mellanox.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent e7c4d8e6
...@@ -5775,12 +5775,14 @@ int mlx5_ib_stage_init_init(struct mlx5_ib_dev *dev) ...@@ -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); dev->advise_mr_wq = alloc_ordered_workqueue("mlx5_ib_advise_mr_wq", 0);
if (!dev->advise_mr_wq) { if (!dev->advise_mr_wq) {
err = -ENOMEM; err = -ENOMEM;
goto err_free_port; goto err_mp;
} }
err = init_srcu_struct(&dev->mr_srcu); err = init_srcu_struct(&dev->mr_srcu);
if (err) if (err) {
goto err_free_port; destroy_workqueue(dev->advise_mr_wq);
goto err_mp;
}
#endif #endif
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment