Commit 805d157e authored by dingtianhong's avatar dingtianhong Committed by David S. Miller
Browse files

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 <>
Cc: Veaceslav Falico <>
Cc: Andy Gospodarek <>
Signed-off-by: default avatarDing Tianhong <>
Reviewed-by: default avatarJiri Pirko <>
Signed-off-by: default avatarDavid S. Miller <>
parent 25f929fb
......@@ -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) {
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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment