aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bond_alb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/bonding/bond_alb.c')
-rw-r--r--drivers/net/bonding/bond_alb.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
index 32923162179e..217a2eedee0a 100644
--- a/drivers/net/bonding/bond_alb.c
+++ b/drivers/net/bonding/bond_alb.c
@@ -184,7 +184,7 @@ static int tlb_initialize(struct bonding *bond)
184 184
185 spin_lock_init(&(bond_info->tx_hashtbl_lock)); 185 spin_lock_init(&(bond_info->tx_hashtbl_lock));
186 186
187 new_hashtbl = kmalloc(size, GFP_KERNEL); 187 new_hashtbl = kzalloc(size, GFP_KERNEL);
188 if (!new_hashtbl) { 188 if (!new_hashtbl) {
189 printk(KERN_ERR DRV_NAME 189 printk(KERN_ERR DRV_NAME
190 ": %s: Error: Failed to allocate TLB hash table\n", 190 ": %s: Error: Failed to allocate TLB hash table\n",
@@ -195,8 +195,6 @@ static int tlb_initialize(struct bonding *bond)
195 195
196 bond_info->tx_hashtbl = new_hashtbl; 196 bond_info->tx_hashtbl = new_hashtbl;
197 197
198 memset(bond_info->tx_hashtbl, 0, size);
199
200 for (i = 0; i < TLB_HASH_TABLE_SIZE; i++) { 198 for (i = 0; i < TLB_HASH_TABLE_SIZE; i++) {
201 tlb_init_table_entry(&bond_info->tx_hashtbl[i], 1); 199 tlb_init_table_entry(&bond_info->tx_hashtbl[i], 1);
202 } 200 }