net: dsa: fix switch tree list
authorVivien Didelot <vivien.didelot@gmail.com>
Fri, 18 Oct 2019 21:02:46 +0000 (17:02 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 10 Nov 2019 10:27:53 +0000 (11:27 +0100)
commitc33f7efec3b346fcac55c0e2f74bf45290d5fc54
tree88b3ab9d3a34f4cac86054319e58ee9cc8d5bbf5
parent6b5bf3f37f726cf35e647aaec9f157d3685b291e
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>
net/dsa/dsa2.c