From: Vivien Didelot Date: Fri, 18 Oct 2019 21:02:46 +0000 (-0400) Subject: net: dsa: fix switch tree list X-Git-Tag: v5.4-rc4~6^2~1 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=50c7d2ba9de20f60a2d527ad6928209ef67e4cdd;p=users%2Fjedix%2Flinux-maple.git 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") Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller --- diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c index 73002022c9d8..716d265ba8ca 100644 --- a/net/dsa/dsa2.c +++ b/net/dsa/dsa2.c @@ -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);