Commit 50c7d2ba authored by Vivien Didelot's avatar Vivien Didelot Committed by David S. Miller

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: 83c0afae ("net: dsa: Add new binding implementation")
Signed-off-by: default avatarVivien Didelot <vivien.didelot@gmail.com>
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 05908d72
...@@ -46,7 +46,7 @@ static struct dsa_switch_tree *dsa_tree_alloc(int index) ...@@ -46,7 +46,7 @@ static struct dsa_switch_tree *dsa_tree_alloc(int index)
dst->index = index; dst->index = index;
INIT_LIST_HEAD(&dst->list); 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); kref_init(&dst->refcount);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment