Skip to content

Commit

Permalink
net: dsa: fix switch tree list
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
vivien authored and davem330 committed Oct 19, 2019
1 parent 05908d7 commit 50c7d2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/dsa/dsa2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 50c7d2b

Please sign in to comment.