aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bond_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/bonding/bond_main.c')
-rw-r--r--drivers/net/bonding/bond_main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 2359478b977f..8ab6bdbe1682 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -4192,7 +4192,6 @@ static void bond_destructor(struct net_device *bond_dev)
4192 struct bonding *bond = netdev_priv(bond_dev); 4192 struct bonding *bond = netdev_priv(bond_dev);
4193 if (bond->wq) 4193 if (bond->wq)
4194 destroy_workqueue(bond->wq); 4194 destroy_workqueue(bond->wq);
4195 free_netdev(bond_dev);
4196} 4195}
4197 4196
4198void bond_setup(struct net_device *bond_dev) 4197void bond_setup(struct net_device *bond_dev)
@@ -4212,7 +4211,8 @@ void bond_setup(struct net_device *bond_dev)
4212 bond_dev->netdev_ops = &bond_netdev_ops; 4211 bond_dev->netdev_ops = &bond_netdev_ops;
4213 bond_dev->ethtool_ops = &bond_ethtool_ops; 4212 bond_dev->ethtool_ops = &bond_ethtool_ops;
4214 4213
4215 bond_dev->destructor = bond_destructor; 4214 bond_dev->needs_free_netdev = true;
4215 bond_dev->priv_destructor = bond_destructor;
4216 4216
4217 SET_NETDEV_DEVTYPE(bond_dev, &bond_type); 4217 SET_NETDEV_DEVTYPE(bond_dev, &bond_type);
4218 4218
@@ -4736,7 +4736,7 @@ int bond_create(struct net *net, const char *name)
4736 4736
4737 rtnl_unlock(); 4737 rtnl_unlock();
4738 if (res < 0) 4738 if (res < 0)
4739 bond_destructor(bond_dev); 4739 free_netdev(bond_dev);
4740 return res; 4740 return res;
4741} 4741}
4742 4742