Skip to contentSkip to conversation

net: dsa: fix switch tree list

PATCH In review Vivien Didelot 3 participants 3 messages Oct 18, 2019 – Oct 19, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: dsa: fix switch tree list

If there are multiple switch trees on the device, only the last one will be listed, because the arguments of list_add_tail are swapped.

Fixes 83c0afaec7b7 ("net: dsa: Add new binding implementation")
---
 net/dsa/dsa2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/dsa/dsa2.c +1 -1
index 73002022c9d8..716d265ba8ca 100644
@@ -46,7 +46,7 @@ static struct dsa_switch_tree *dsa_tree_alloc(int index)
 	dst->index = index;
 
 	INIT_LIST_HEAD(&dst->list);
-	list_add_tail(&dsa_tree_list, &dst->list);
+	list_add_tail(&dst->list, &dsa_tree_list);
 
 	kref_init(&dst->refcount);
 
Signature · 1 line
2.23.0