net/mlx5: DR, In destroy flow, free resources even if FW command failed
authorYevgeny Kliteynik <kliteyn@nvidia.com>
Sun, 24 Jul 2022 21:30:50 +0000 (00:30 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Thu, 27 Oct 2022 14:50:36 +0000 (15:50 +0100)
Otherwise resources will never be freed and refcount will not be decreased.

Signed-off-by: Chris Mi <cmi@nvidia.com>
Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Reviewed-by: Alex Vesker <valex@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_table.c

index 31d443d..eb81759 100644 (file)
@@ -292,7 +292,7 @@ int mlx5dr_table_destroy(struct mlx5dr_table *tbl)
        mlx5dr_dbg_tbl_del(tbl);
        ret = dr_table_destroy_sw_owned_tbl(tbl);
        if (ret)
-               return ret;
+               mlx5dr_err(tbl->dmn, "Failed to destoy sw owned table\n");
 
        dr_table_uninit(tbl);