Skip to contentSkip to conversation

net: dsa: remove duplicate assignment in dsa_slave_add_cls_matchall_mirred

PATCH Applied Vladimir Oltean 2 participants 2 messages May 4, 2020 – May 7, 2020

Subsystems (3)
lore
Share & tools
lore

Vladimir Oltean

author maintainer
#0 lore raw

PATCH v2 1/1 net: dsa: remove duplicate assignment in dsa_slave_add_cls_matchall_mirred

From: Vladimir Oltean <[email protected]>

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 e13c2075280e ("net: dsa: refactor matchall mirred action to separate function")

---
Changes in v2:
Forgot to copy the netdev list.

 net/dsa/slave.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
net/dsa/slave.c +3 -5
index ba8bf90dc0cc..a7f5fe64c2f3 100644
@@ -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;
 
Signature · 1 line
2.17.1
maintainer Applied
#1 lore raw

From: Vladimir Oltean <[email protected]>
Date: Mon, 4 May 2020 22:58:56 +0300

Quoted 8 lines

From: Vladimir Oltean <[email protected]>

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 e13c2075280e ("net: dsa: refactor matchall mirred action to separate function")

Applied, thanks.