diff options
author | Vivien Didelot <vivien.didelot@gmail.com> | 2019-10-18 17:02:46 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-11-10 11:25:32 +0100 |
commit | af3924a97ea10ec3761fd4d7f9f2046febee6a04 (patch) | |
tree | 20632834aca6a89c3d0c61b0ae1c1da132236077 /net/dsa | |
parent | adea9fd3b159cf25d2567b112bc7b84479447e72 (diff) | |
download | linux-stable-af3924a97ea10ec3761fd4d7f9f2046febee6a04.tar.gz linux-stable-af3924a97ea10ec3761fd4d7f9f2046febee6a04.tar.bz2 linux-stable-af3924a97ea10ec3761fd4d7f9f2046febee6a04.zip |
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.c | 2 |
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; |