Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: dsa: Fix dsa_is_user_port() test inversion

During the conversion to dsa_is_user_port(), a condition ended up being
reversed, which would prevent the creation of any user port when using
the legacy binding and/or platform data, fix that.

Fixes: 4a5b85ffe2a0 ("net: dsa: use dsa_is_user_port everywhere")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Florian Fainelli and committed by
David S. Miller
5a9f8df6 59bb8835

+1 -1
+1 -1
net/dsa/legacy.c
··· 194 194 ds->ports[i].dn = cd->port_dn[i]; 195 195 ds->ports[i].cpu_dp = dst->cpu_dp; 196 196 197 - if (dsa_is_user_port(ds, i)) 197 + if (!dsa_is_user_port(ds, i)) 198 198 continue; 199 199 200 200 ret = dsa_slave_create(&ds->ports[i]);