It got complicated because of the #ifdef. Fixes: 813e90b1aeaa ("IB/mlx5: Add advise_mr() support") Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxxxx> --- drivers/infiniband/hw/mlx5/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c index 9b40ec73cc646c..cefff6b05d6cc9 100644 --- a/drivers/infiniband/hw/mlx5/main.c +++ b/drivers/infiniband/hw/mlx5/main.c @@ -5779,8 +5779,10 @@ int mlx5_ib_stage_init_init(struct mlx5_ib_dev *dev) } err = init_srcu_struct(&dev->mr_srcu); - if (err) + if (err) { + destroy_workqueue(dev->advise_mr_wq); goto err_free_port; + } #endif return 0; -- 2.19.2