]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: dsa: fix spurious error message when unoffloaded port leaves bridge
authorAlvin Šipraga <alsi@bang-olufsen.dk>
Tue, 12 Oct 2021 11:27:31 +0000 (13:27 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 12 Oct 2021 23:11:23 +0000 (16:11 -0700)
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: d371b7c92d19 ("net: dsa: Unset vlan_filtering when ports leave the bridge")
Signed-off-by: Alvin Šipraga <alsi@bang-olufsen.dk>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20211012112730.3429157-1-alvin@pqrs.dk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/dsa/switch.c

index 1c797ec8e2c2b805a890df560c80b4f0eb45d4da..6466d0539af9ffea73dda13dfc1e656fe607cf4d 100644 (file)
@@ -168,7 +168,7 @@ static int dsa_switch_bridge_leave(struct dsa_switch *ds,
                if (extack._msg)
                        dev_err(ds->dev, "port %d: %s\n", info->port,
                                extack._msg);
-               if (err && err != EOPNOTSUPP)
+               if (err && err != -EOPNOTSUPP)
                        return err;
        }