Commit 8a955da2 authored by Saeed Mahameed's avatar Saeed Mahameed

net/mlx5: E-Switch, remove redundant else statements

These else statement blocks are redundant since the if block already
jumps to the function abort label.
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
Reviewed-by: default avatarRahul Rameshbabu <rrameshbabu@nvidia.com>
parent 791eb782
...@@ -285,9 +285,8 @@ static int _mlx5_eswitch_set_vepa_locked(struct mlx5_eswitch *esw, ...@@ -285,9 +285,8 @@ static int _mlx5_eswitch_set_vepa_locked(struct mlx5_eswitch *esw,
if (IS_ERR(flow_rule)) { if (IS_ERR(flow_rule)) {
err = PTR_ERR(flow_rule); err = PTR_ERR(flow_rule);
goto out; goto out;
} else {
esw->fdb_table.legacy.vepa_uplink_rule = flow_rule;
} }
esw->fdb_table.legacy.vepa_uplink_rule = flow_rule;
/* Star rule to forward all traffic to uplink vport */ /* Star rule to forward all traffic to uplink vport */
memset(&dest, 0, sizeof(dest)); memset(&dest, 0, sizeof(dest));
...@@ -299,9 +298,8 @@ static int _mlx5_eswitch_set_vepa_locked(struct mlx5_eswitch *esw, ...@@ -299,9 +298,8 @@ static int _mlx5_eswitch_set_vepa_locked(struct mlx5_eswitch *esw,
if (IS_ERR(flow_rule)) { if (IS_ERR(flow_rule)) {
err = PTR_ERR(flow_rule); err = PTR_ERR(flow_rule);
goto out; goto out;
} else {
esw->fdb_table.legacy.vepa_star_rule = flow_rule;
} }
esw->fdb_table.legacy.vepa_star_rule = flow_rule;
out: out:
kvfree(spec); kvfree(spec);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment