diff options
Diffstat (limited to 'drivers/net/bonding/bond_main.c')
-rw-r--r-- | drivers/net/bonding/bond_main.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index d3801a00d3d5..8ce8fec615ba 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -1343,14 +1343,12 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev) | |||
1343 | "inaccurate.\n", bond_dev->name, slave_dev->name); | 1343 | "inaccurate.\n", bond_dev->name, slave_dev->name); |
1344 | } | 1344 | } |
1345 | 1345 | ||
1346 | new_slave = kmalloc(sizeof(struct slave), GFP_KERNEL); | 1346 | new_slave = kzalloc(sizeof(struct slave), GFP_KERNEL); |
1347 | if (!new_slave) { | 1347 | if (!new_slave) { |
1348 | res = -ENOMEM; | 1348 | res = -ENOMEM; |
1349 | goto err_undo_flags; | 1349 | goto err_undo_flags; |
1350 | } | 1350 | } |
1351 | 1351 | ||
1352 | memset(new_slave, 0, sizeof(struct slave)); | ||
1353 | |||
1354 | /* save slave's original flags before calling | 1352 | /* save slave's original flags before calling |
1355 | * netdev_set_master and dev_open | 1353 | * netdev_set_master and dev_open |
1356 | */ | 1354 | */ |