mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
net: dsa: fix switch tree list
[ Upstream commit50c7d2ba9d] 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:83c0afaec7("net: dsa: Add new binding implementation") Signed-off-by: Vivien Didelot <vivien.didelot@gmail.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
6b5bf3f37f
commit
c33f7efec3
@@ -49,7 +49,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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user