net/mlx5: Fix a NULL vs IS_ERR() check
Subsystems (5)
PATCH 1/1 net/mlx5: Fix a NULL vs IS_ERR() check
The mlx5_chains_get_table() function doesn't return NULL, it returns error pointers so we need to fix this condition.
Fixes 34ca65352ddf ("net/mlx5: E-Switch, Indirect table infrastructure")
Signed-off-by Dan Carpenter <[email protected]>
---
This applies to net-next but it might actually go through a different tree before going to net? I don't know how this works...
drivers/net/ethernet/mellanox/mlx5/core/esw/indir_table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlx5/core/esw/indir_table.c +1 -1
@@ -216,7 +216,7 @@ static int mlx5_esw_indir_table_rule_get(struct mlx5_eswitch *esw, flow_act.flags =FLOW_ACT_IGNORE_FLOW_LEVEL |FLOW_ACT_NO_APPEND ; dest.type =MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE ; dest.ft =mlx5_chains_get_table (chains,0 ,1 ,0 ); -if (!dest.ft) { +if (IS_ERR (dest.ft)) { err =PTR_ERR (dest.ft); goto err_table; }
Signature · 1 line
2.30.0
Quoted 5 lines · Dan Carpenter
The
mlx5_chains_get_table()function doesn't return NULL, it returns error pointers so we need to fix this condition.Fixes 34ca65352ddf ("net/mlx5: E-Switch, Indirect table infrastructure")Signed-off-by Dan Carpenter <[email protected]>
Thanks, Dan!
Reviewed-by Vlad Buslov <[email protected]>
Saeed Mahameed
AppliedQuoted 6 lines · Vlad Buslov
Quoted 4 lines · Dan Carpenter
The
mlx5_chains_get_table()function doesn't return NULL, it returns
error pointers so we need to fix this condition.
Quoted 7 lines
Quoted 3 lines
Fixes 34ca65352ddf ("net/mlx5: E-Switch, Indirect tableinfrastructure")
Signed-off-by Dan Carpenter <[email protected]>Thanks, Dan!
Reviewed-by Vlad Buslov <[email protected]>
Applied to net-next-mlx5
Thanks!