Skip to content

Commit

Permalink
net: dsa: remove duplicate assignment in dsa_slave_add_cls_matchall_m…
Browse files Browse the repository at this point in the history
…irred

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 <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Vladimir Oltean authored and David S. Miller committed May 7, 2020
1 parent 9274124 commit 6572215
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions net/dsa/slave.c
Original file line number Diff line number Diff line change
Expand Up @@ -856,20 +856,18 @@ dsa_slave_add_cls_matchall_mirred(struct net_device *dev,
struct dsa_port *to_dp;
int err;

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

if (!ds->ops->port_mirror_add)
return -EOPNOTSUPP;

if (!act->dev)
return -EINVAL;

if (!flow_action_basic_hw_stats_check(&cls->rule->action,
cls->common.extack))
return -EOPNOTSUPP;

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

if (!act->dev)
return -EINVAL;

if (!dsa_slave_dev_check(act->dev))
return -EOPNOTSUPP;

Expand Down

0 comments on commit 6572215

Please sign in to comment.