diff options
author | Ido Schimmel <idosch@mellanox.com> | 2015-11-13 12:06:12 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-11-16 20:56:03 +0100 |
commit | bbe14f54297467ddb23b7d1db564a2468c6ae151 (patch) | |
tree | b18422fab1ab8d41e3d7325d338d55b1a98be03c /net/bridge/br_stp_if.c | |
parent | be2net: replace hardcoded values with existing define (diff) | |
download | linux-bbe14f54297467ddb23b7d1db564a2468c6ae151.tar.xz linux-bbe14f54297467ddb23b7d1db564a2468c6ae151.zip |
switchdev: bridge: Check return code is not EOPNOTSUPP
When NET_SWITCHDEV=n, switchdev_port_attr_set simply returns EOPNOTSUPP.
In this case we should not emit errors and warnings to the kernel log.
Reported-by: Sander Eikelenboom <linux@eikelenboom.it>
Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
Fixes: 0bc05d585d38 ("switchdev: allow caller to explicitly request
attr_set as deferred")
Fixes: 6ac311ae8bfb ("Adding switchdev ageing notification on port
bridged")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_stp_if.c')
-rw-r--r-- | net/bridge/br_stp_if.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bridge/br_stp_if.c b/net/bridge/br_stp_if.c index fa53d7a89f48..5396ff08af32 100644 --- a/net/bridge/br_stp_if.c +++ b/net/bridge/br_stp_if.c @@ -50,7 +50,7 @@ void br_init_port(struct net_bridge_port *p) p->config_pending = 0; err = switchdev_port_attr_set(p->dev, &attr); - if (err) + if (err && err != -EOPNOTSUPP) netdev_err(p->dev, "failed to set HW ageing time\n"); } |