summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authordingtianhong <dingtianhong@huawei.com>2014-02-12 14:58:49 +0800
committerDavid S. Miller <davem@davemloft.net>2014-02-13 17:49:12 -0500
commit805d157e8f4273eeafeeab53c3a5d295ac0d9208 (patch)
tree38002604ce839e1bc12e6348d96a3988e2fb131d /drivers
parent25f929fbff0d1bcebf2e92656d33025cd330cbf8 (diff)
downloadop-kernel-dev-805d157e8f4273eeafeeab53c3a5d295ac0d9208.zip
op-kernel-dev-805d157e8f4273eeafeeab53c3a5d295ac0d9208.tar.gz
bonding: remove the redundant judgements for bond_set_mac_address()
The dev_set_mac_address() will check the dev->netdev_ops->ndo_set_mac_address, so no need to check it in bond_set_mac_address(). Cc: Jay Vosburgh <fubar@us.ibm.com> Cc: Veaceslav Falico <vfalico@redhat.com> Cc: Andy Gospodarek <andy@greyhouse.net> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Reviewed-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/bonding/bond_main.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 71ba18e..58aa531 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -3461,15 +3461,7 @@ static int bond_set_mac_address(struct net_device *bond_dev, void *addr)
*/
bond_for_each_slave(bond, slave, iter) {
- const struct net_device_ops *slave_ops = slave->dev->netdev_ops;
pr_debug("slave %p %s\n", slave, slave->dev->name);
-
- if (slave_ops->ndo_set_mac_address == NULL) {
- res = -EOPNOTSUPP;
- pr_debug("EOPNOTSUPP %s\n", slave->dev->name);
- goto unwind;
- }
-
res = dev_set_mac_address(slave->dev, addr);
if (res) {
/* TODO: consider downing the slave
OpenPOWER on IntegriCloud