net/mlx5: E-Switch, remove redundant error handling
authorSaeed Mahameed <saeedm@mellanox.com>
Mon, 29 Jul 2019 21:13:08 +0000 (21:13 +0000)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 1 Aug 2019 18:14:25 +0000 (11:14 -0700)
We don't need to handle error flow of esw_create_legacy_table() in the
same branch, it is already being handled directly after the if statement,
for both legacy and switchdev modes in one place.

Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c

index 6d82aefae6e1ec08ef71b3bba7579ad76a2ac075..17fb982b3489105f8830e63ee4e3ac6a8995954e 100644 (file)
@@ -1855,8 +1855,6 @@ int mlx5_eswitch_enable(struct mlx5_eswitch *esw, int mode)
 
        if (mode == MLX5_ESWITCH_LEGACY) {
                err = esw_create_legacy_table(esw);
-               if (err)
-                       goto abort;
        } else {
                mlx5_reload_interface(esw->dev, MLX5_INTERFACE_PROTOCOL_ETH);
                mlx5_reload_interface(esw->dev, MLX5_INTERFACE_PROTOCOL_IB);