Skip to content

Commit

Permalink
net: dsa: Fix dsa_is_user_port() test inversion
Browse files Browse the repository at this point in the history
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: 4a5b85f ("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>
  • Loading branch information
Florian Fainelli authored and David S. Miller committed Mar 13, 2018
1 parent 59bb883 commit 5a9f8df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/dsa/legacy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down

0 comments on commit 5a9f8df

Please sign in to comment.