summaryrefslogtreecommitdiffstats
path: root/net/dsa
diff options
context:
space:
mode:
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>2016-03-13 16:21:33 -0400
committerDavid S. Miller <davem@davemloft.net>2016-03-14 16:05:31 -0400
commit16bfa7024eba5e36aff38ba62086b9027373007d (patch)
treefd05f05fe264eada7ea446a554c0fa0933019abd /net/dsa
parent71327a4e7d997276d49db92fd3d30008389ee6d5 (diff)
downloadlinux-16bfa7024eba5e36aff38ba62086b9027373007d.tar.bz2
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.c9
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;
}