Skip to content

Commit 640fcdb

Browse files
error27Saeed Mahameed
authored andcommitted
net/mlx5: E-Switch, Fix an Oops in error handling code
The error handling dereferences "vport". There is nothing we can do if it is an error pointer except returning the error code. Fixes: 133dcfc ("net/mlx5: E-Switch, Alloc and free unique metadata for match") Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Roi Dayan <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent 44d5531 commit 640fcdb

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/net/ethernet/mellanox/mlx5/core/esw/acl/ingress_ofld.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,8 +364,7 @@ int mlx5_esw_acl_ingress_vport_metadata_update(struct mlx5_eswitch *esw, u16 vpo
364364

365365
if (WARN_ON_ONCE(IS_ERR(vport))) {
366366
esw_warn(esw->dev, "vport(%d) invalid!\n", vport_num);
367-
err = PTR_ERR(vport);
368-
goto out;
367+
return PTR_ERR(vport);
369368
}
370369

371370
esw_acl_ingress_ofld_rules_destroy(esw, vport);

0 commit comments

Comments
 (0)