net: dsa: fix switch tree list
authorVivien Didelot <vivien.didelot@gmail.com>
Fri, 18 Oct 2019 21:02:46 +0000 (17:02 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sat, 19 Oct 2019 19:19:41 +0000 (12:19 -0700)
commit50c7d2ba9de20f60a2d527ad6928209ef67e4cdd
tree40ca1db2461bd0a1479c2a041194b92fb49193ec
parent05908d72cc8fa39058cd9535db2833089cc3df6f
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 <vivien.didelot@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/dsa2.c