Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f4b5e4f1 authored by Vivien Didelot's avatar Vivien Didelot Committed by Greg Kroah-Hartman
Browse files

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: 83c0afae ("net: dsa: Add new binding implementation")
Signed-off-by: default avatarVivien Didelot <vivien.didelot@gmail.com>
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0e204b65
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ static struct dsa_switch_tree *dsa_add_dst(u32 tree)
	dst->tree = tree;
	dst->cpu_switch = -1;
	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;