Commit 43a4b4db authored by Alvin Šipraga's avatar Alvin Šipraga Committed by Jakub Kicinski

net: dsa: fix spurious error message when unoffloaded port leaves bridge

Flip the sign of a return value check, thereby suppressing the following
spurious error:

  port 2 failed to notify DSA_NOTIFIER_BRIDGE_LEAVE: -EOPNOTSUPP

... which is emitted when removing an unoffloaded DSA switch port from a
bridge.

Fixes: d371b7c9 ("net: dsa: Unset vlan_filtering when ports leave the bridge")
Signed-off-by: default avatarAlvin Šipraga <alsi@bang-olufsen.dk>
Reviewed-by: default avatarVladimir Oltean <olteanv@gmail.com>
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20211012112730.3429157-1-alvin@pqrs.dkSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 60d950f4
...@@ -168,7 +168,7 @@ static int dsa_switch_bridge_leave(struct dsa_switch *ds, ...@@ -168,7 +168,7 @@ static int dsa_switch_bridge_leave(struct dsa_switch *ds,
if (extack._msg) if (extack._msg)
dev_err(ds->dev, "port %d: %s\n", info->port, dev_err(ds->dev, "port %d: %s\n", info->port,
extack._msg); extack._msg);
if (err && err != EOPNOTSUPP) if (err && err != -EOPNOTSUPP)
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment