diff options
author | Vivien Didelot <vivien.didelot@gmail.com> | 2019-10-19 00:02:46 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-11-10 13:27:53 +0300 |
commit | c33f7efec3b346fcac55c0e2f74bf45290d5fc54 (patch) | |
tree | 88b3ab9d3a34f4cac86054319e58ee9cc8d5bbf5 | |
parent | 6b5bf3f37f726cf35e647aaec9f157d3685b291e (diff) | |
download | linux-c33f7efec3b346fcac55c0e2f74bf45290d5fc54.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>
-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 a1917025e155..46ae4dee522a 100644 --- a/net/dsa/dsa2.c +++ b/net/dsa/dsa2.c @@ -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); |