summaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bond_alb.c
diff options
context:
space:
mode:
authorJoe Jin <lkmaillist@gmail.com>2007-02-06 14:16:40 -0800
committerDavid S. Miller <davem@sunset.davemloft.net>2007-02-08 12:38:59 -0800
commit243cb4e56061c3f4cb76312c5527840344d57c3b (patch)
treeb859dc994bd6a1eb9267572180bc206331bfbac3 /drivers/net/bonding/bond_alb.c
parent6b31a515e3401685cdab2eeb6692f1a0f53f72ca (diff)
downloadblackbird-op-linux-243cb4e56061c3f4cb76312c5527840344d57c3b.tar.gz
blackbird-op-linux-243cb4e56061c3f4cb76312c5527840344d57c3b.zip
[BONDING]: Replace kmalloc() + memset() pairs with the appropriate kzalloc() calls
Replace kmalloc() + memset() pairs with the appropriate kzalloc() calls in the bonding driver. Signed-off-by: Joe Jin <lkmaillist@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
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)
spin_lock_init(&(bond_info->tx_hashtbl_lock));
- new_hashtbl = kmalloc(size, GFP_KERNEL);
+ new_hashtbl = kzalloc(size, GFP_KERNEL);
if (!new_hashtbl) {
printk(KERN_ERR DRV_NAME
": %s: Error: Failed to allocate TLB hash table\n",
@@ -195,8 +195,6 @@ static int tlb_initialize(struct bonding *bond)
bond_info->tx_hashtbl = new_hashtbl;
- memset(bond_info->tx_hashtbl, 0, size);
-
for (i = 0; i < TLB_HASH_TABLE_SIZE; i++) {
tlb_init_table_entry(&bond_info->tx_hashtbl[i], 1);
}
OpenPOWER on IntegriCloud