Skip to content

Commit 50c7d2b

Browse files
viviendavem330
authored andcommitted
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: 83c0afa ("net: dsa: Add new binding implementation") Signed-off-by: Vivien Didelot <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 05908d7 commit 50c7d2b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/dsa/dsa2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ static struct dsa_switch_tree *dsa_tree_alloc(int index)
4646
dst->index = index;
4747

4848
INIT_LIST_HEAD(&dst->list);
49-
list_add_tail(&dsa_tree_list, &dst->list);
49+
list_add_tail(&dst->list, &dsa_tree_list);
5050

5151
kref_init(&dst->refcount);
5252

0 commit comments

Comments
 (0)