[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>
Šī revīzija ir iekļauta:

revīziju iesūtīja
David S. Miller

vecāks
6b31a515e3
revīzija
243cb4e560
@@ -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);
|
||||
}
|
||||
|
Atsaukties uz šo jaunā problēmā
Block a user