]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
IB/mlx5: Fix label order in error path handling
authorParav Pandit <parav@mellanox.com>
Sun, 1 Oct 2017 06:54:35 +0000 (09:54 +0300)
committerDoug Ledford <dledford@redhat.com>
Wed, 4 Oct 2017 18:59:15 +0000 (14:59 -0400)
When UAR get_page fails, it needs to continue to cleanup debugfs for
congestion control parameters. Labels for error path were incorrectly
ordered.

This patch fixes to do correct cleanup on debugfs init failure and uar
get page failure.

Fixes: 4a2da0b8c078 ("IB/mlx5: Add debug control parameters for congestion control")
Signed-off-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/mlx5/main.c

index d6fbad8f34aa71848c7291122ad847b6944a27a6..552f7bd4ecc38bf17aff093fa037b423c4d0026b 100644 (file)
@@ -4174,9 +4174,9 @@ err_bfreg:
 err_uar_page:
        mlx5_put_uars_page(dev->mdev, dev->mdev->priv.uar);
 
-err_cnt:
-       mlx5_ib_cleanup_cong_debugfs(dev);
 err_cong:
+       mlx5_ib_cleanup_cong_debugfs(dev);
+err_cnt:
        if (MLX5_CAP_GEN(dev->mdev, max_qp_cnt))
                mlx5_ib_dealloc_counters(dev);