Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 195278
b: refs/heads/master
c: a05abcb
h: refs/heads/master
v: v3
  • Loading branch information
Julia Lawall authored and David S. Miller committed May 18, 2010
1 parent a9457ea commit 981c54a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 476c609e6eebe73e6038068b16a22238617b54a4
refs/heads/master: a05abcb5c912ce7127e5c638b490313e88541784
3 changes: 1 addition & 2 deletions trunk/drivers/net/ibmveth.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ static int ibmveth_alloc_buffer_pool(struct ibmveth_buff_pool *pool)
return -1;
}

pool->skbuff = kmalloc(sizeof(void*) * pool->size, GFP_KERNEL);
pool->skbuff = kcalloc(pool->size, sizeof(void *), GFP_KERNEL);

if(!pool->skbuff) {
kfree(pool->dma_addr);
Expand All @@ -211,7 +211,6 @@ static int ibmveth_alloc_buffer_pool(struct ibmveth_buff_pool *pool)
return -1;
}

memset(pool->skbuff, 0, sizeof(void*) * pool->size);
memset(pool->dma_addr, 0, sizeof(dma_addr_t) * pool->size);

for(i = 0; i < pool->size; ++i) {
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/net/ksz884x.c
Original file line number Diff line number Diff line change
Expand Up @@ -7049,10 +7049,9 @@ static int __init pcidev_init(struct pci_dev *pdev,
mib_port_count = SWITCH_PORT_NUM;
}
hw->mib_port_cnt = TOTAL_PORT_NUM;
hw->ksz_switch = kmalloc(sizeof(struct ksz_switch), GFP_KERNEL);
hw->ksz_switch = kzalloc(sizeof(struct ksz_switch), GFP_KERNEL);
if (!hw->ksz_switch)
goto pcidev_init_alloc_err;
memset(hw->ksz_switch, 0, sizeof(struct ksz_switch));

sw = hw->ksz_switch;
}
Expand Down

0 comments on commit 981c54a

Please sign in to comment.