diff options
Diffstat (limited to 'drivers/net/bonding')
-rw-r--r-- | drivers/net/bonding/bond_main.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 7eeb18751d67..cbe9e353d46a 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -1480,8 +1480,15 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev) | |||
1480 | bond_dev->name, | 1480 | bond_dev->name, |
1481 | bond_dev->type, slave_dev->type); | 1481 | bond_dev->type, slave_dev->type); |
1482 | 1482 | ||
1483 | netdev_bonding_change(bond_dev, | 1483 | res = netdev_bonding_change(bond_dev, |
1484 | NETDEV_PRE_TYPE_CHANGE); | 1484 | NETDEV_PRE_TYPE_CHANGE); |
1485 | res = notifier_to_errno(res); | ||
1486 | if (res) { | ||
1487 | pr_err("%s: refused to change device type\n", | ||
1488 | bond_dev->name); | ||
1489 | res = -EBUSY; | ||
1490 | goto err_undo_flags; | ||
1491 | } | ||
1485 | 1492 | ||
1486 | if (slave_dev->type != ARPHRD_ETHER) | 1493 | if (slave_dev->type != ARPHRD_ETHER) |
1487 | bond_setup_by_slave(bond_dev, slave_dev); | 1494 | bond_setup_by_slave(bond_dev, slave_dev); |