diff options
author | Vivien Didelot <vivien.didelot@savoirfairelinux.com> | 2016-03-13 23:21:33 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-03-14 23:05:31 +0300 |
commit | 16bfa7024eba5e36aff38ba62086b9027373007d (patch) | |
tree | fd05f05fe264eada7ea446a554c0fa0933019abd /net/dsa | |
parent | 71327a4e7d997276d49db92fd3d30008389ee6d5 (diff) | |
download | linux-16bfa7024eba5e36aff38ba62086b9027373007d.tar.xz |
net: dsa: make port_bridge_leave return void
netdev_upper_dev_unlink() which notifies NETDEV_CHANGEUPPER, returns
void, as well as del_nbp(). So there's no advantage to catch an eventual
error from the port_bridge_leave routine at the DSA level.
Make this routine void for the DSA layer and its existing drivers.
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa')
-rw-r--r-- | net/dsa/slave.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/net/dsa/slave.c b/net/dsa/slave.c index 52653d715f64..8e00f1d83eb8 100644 --- a/net/dsa/slave.c +++ b/net/dsa/slave.c @@ -454,15 +454,14 @@ static int dsa_slave_bridge_port_join(struct net_device *dev, return ret; } -static int dsa_slave_bridge_port_leave(struct net_device *dev) +static void dsa_slave_bridge_port_leave(struct net_device *dev) { struct dsa_slave_priv *p = netdev_priv(dev); struct dsa_switch *ds = p->parent; - int ret = -EOPNOTSUPP; if (ds->drv->port_bridge_leave) - ret = ds->drv->port_bridge_leave(ds, p->port); + ds->drv->port_bridge_leave(ds, p->port); p->bridge_dev = NULL; @@ -470,8 +469,6 @@ static int dsa_slave_bridge_port_leave(struct net_device *dev) * so allow it to be in BR_STATE_FORWARDING to be kept functional */ dsa_slave_stp_update(dev, BR_STATE_FORWARDING); - - return ret; } static int dsa_slave_port_attr_get(struct net_device *dev, @@ -1156,7 +1153,7 @@ static int dsa_slave_master_changed(struct net_device *dev) !strcmp(master->rtnl_link_ops->kind, "bridge")) err = dsa_slave_bridge_port_join(dev, master); else if (dsa_port_is_bridged(p)) - err = dsa_slave_bridge_port_leave(dev); + dsa_slave_bridge_port_leave(dev); return err; } |