Skip to content

Commit 6572215

Browse files
vladimirolteandavem330
authored andcommitted
net: dsa: remove duplicate assignment in dsa_slave_add_cls_matchall_mirred
This was caused by a poor merge conflict resolution on my side. The "act = &cls->rule->action.entries[0];" assignment was already present in the code prior to the patch mentioned below. Fixes: e13c207 ("net: dsa: refactor matchall mirred action to separate function") Signed-off-by: Vladimir Oltean <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 9274124 commit 6572215

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

net/dsa/slave.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -856,20 +856,18 @@ dsa_slave_add_cls_matchall_mirred(struct net_device *dev,
856856
struct dsa_port *to_dp;
857857
int err;
858858

859-
act = &cls->rule->action.entries[0];
860-
861859
if (!ds->ops->port_mirror_add)
862860
return -EOPNOTSUPP;
863861

864-
if (!act->dev)
865-
return -EINVAL;
866-
867862
if (!flow_action_basic_hw_stats_check(&cls->rule->action,
868863
cls->common.extack))
869864
return -EOPNOTSUPP;
870865

871866
act = &cls->rule->action.entries[0];
872867

868+
if (!act->dev)
869+
return -EINVAL;
870+
873871
if (!dsa_slave_dev_check(act->dev))
874872
return -EOPNOTSUPP;
875873

0 commit comments

Comments
 (0)