summaryrefslogtreecommitdiff
path: root/net/dsa
diff options
context:
space:
mode:
authorVivien Didelot <vivien.didelot@gmail.com>2019-10-19 00:02:46 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-11-10 13:25:32 +0300
commitaf3924a97ea10ec3761fd4d7f9f2046febee6a04 (patch)
tree20632834aca6a89c3d0c61b0ae1c1da132236077 /net/dsa
parentadea9fd3b159cf25d2567b112bc7b84479447e72 (diff)
downloadlinux-af3924a97ea10ec3761fd4d7f9f2046febee6a04.tar.xz
net: dsa: fix switch tree list
[ Upstream commit 50c7d2ba9de20f60a2d527ad6928209ef67e4cdd ] 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 <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>
Diffstat (limited to 'net/dsa')
-rw-r--r--net/dsa/dsa2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c
index 045d8a176279..0796355e74c1 100644
--- a/net/dsa/dsa2.c
+++ b/net/dsa/dsa2.c
@@ -62,7 +62,7 @@ static struct dsa_switch_tree *dsa_add_dst(u32 tree)
return NULL;
dst->tree = tree;
INIT_LIST_HEAD(&dst->list);
- list_add_tail(&dsa_switch_trees, &dst->list);
+ list_add_tail(&dst->list, &dsa_switch_trees);
kref_init(&dst->refcount);
return dst;