net/mlx5: Add forgotten cleanup calls into mlx5_init_once() error path
authorJiri Pirko <jiri@nvidia.com>
Tue, 18 Oct 2022 10:51:52 +0000 (12:51 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 28 Dec 2022 19:38:49 +0000 (11:38 -0800)
There are two cleanup calls missing in mlx5_init_once() error path.
Add them making the error path flow to be the same as
mlx5_cleanup_once().

Fixes: 52ec462eca9b ("net/mlx5: Add reserved-gids support")
Fixes: 7c39afb394c7 ("net/mlx5: PTP code migration to driver core section")
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/main.c

index 7f5db13..ec5652f 100644 (file)
@@ -1050,6 +1050,8 @@ err_rl_cleanup:
 err_tables_cleanup:
        mlx5_geneve_destroy(dev->geneve);
        mlx5_vxlan_destroy(dev->vxlan);
+       mlx5_cleanup_clock(dev);
+       mlx5_cleanup_reserved_gids(dev);
        mlx5_cq_debugfs_cleanup(dev);
        mlx5_fw_reset_cleanup(dev);
 err_events_cleanup: