summaryrefslogtreecommitdiffstats
path: root/net/dsa
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2018-03-13 00:00:40 +0100
committerDavid S. Miller <davem@davemloft.net>2018-03-13 02:04:55 +0100
commit5a9f8df68ee6927f21dd3f2c75c16feb8b53a9e8 (patch)
treed358952a536aa230f5443c7bf16141a3cc00b2b5 /net/dsa
parentMerge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher... (diff)
downloadlinux-5a9f8df68ee6927f21dd3f2c75c16feb8b53a9e8.tar.xz
linux-5a9f8df68ee6927f21dd3f2c75c16feb8b53a9e8.zip
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>
Diffstat (limited to 'net/dsa')
-rw-r--r--net/dsa/legacy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/dsa/legacy.c b/net/dsa/legacy.c
index cb54b81d0bd9..42a7b85b84e1 100644
--- a/net/dsa/legacy.c
+++ b/net/dsa/legacy.c
@@ -194,7 +194,7 @@ static int dsa_switch_setup_one(struct dsa_switch *ds,
ds->ports[i].dn = cd->port_dn[i];
ds->ports[i].cpu_dp = dst->cpu_dp;
- if (dsa_is_user_port(ds, i))
+ if (!dsa_is_user_port(ds, i))
continue;
ret = dsa_slave_create(&ds->ports[i]);