net/mlx5: Call mlx5_sf_id_erase() once in mlx5_sf_dealloc()
authorJiri Pirko <jiri@nvidia.com>
Fri, 2 Jun 2023 11:43:42 +0000 (13:43 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 20 Sep 2023 06:33:06 +0000 (23:33 -0700)
commit2597ee190b4eb48d3b7d35b7bb2cc18046ae087e
tree89be4ec4de27ec7ef952c827052f317d641b2727
parent5bed8d585aa1db1651745173a66e32df82a5cb05
net/mlx5: Call mlx5_sf_id_erase() once in mlx5_sf_dealloc()

Before every call of mlx5_sf_dealloc(), there is a call to
mlx5_sf_id_erase(). So move it to the beginning of mlx5_sf_dealloc().
Also remove redundant mlx5_sf_id_erase() call from mlx5_sf_free()
as it is called only from mlx5_sf_dealloc().

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Reviewed-by: Shay Drory <shayd@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/sf/devlink.c