Skip to content

Commit

Permalink
net: switchdev: ignore unsupported bridge flags
Browse files Browse the repository at this point in the history
switchdev_port_bridge_getlink() queries SWITCHDEV_ATTR_PORT_BRIDGE_FLAGS
attributes, but a driver doesn't need to implement this in order to get
bridge link information.

So error out only on errors different than -EOPNOTSUPP.

(This is a follow-up patch for 7d4f8d8.)

Fixes: 8793d0a ("switchdev: add new switchdev_port_bridge_getlink")
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>
Acked-by: Scott Feldman <sfeldma@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Vivien Didelot authored and David S. Miller committed Jun 24, 2015
1 parent bd049a9 commit 5c8079d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/switchdev/switchdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ int switchdev_port_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq,
int err;

err = switchdev_port_attr_get(dev, &attr);
if (err)
if (err && err != -EOPNOTSUPP)
return err;

return ndo_dflt_bridge_getlink(skb, pid, seq, dev, mode,
Expand Down

0 comments on commit 5c8079d

Please sign in to comment.