projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0268bd0
)
e100: replace kmalloc with kcalloc
author
Yan Burman
<
[email protected]
>
Tue, 12 Dec 2006 19:03:10 +0000
(20:03 +0100)
committer
Adrian Bunk
<
[email protected]
>
Tue, 12 Dec 2006 19:03:10 +0000
(20:03 +0100)
Replace kmalloc+memset with kcalloc
Signed-off-by: Yan Burman <
[email protected]
>
Acked-By: Auke Kok <
[email protected]
>
Signed-off-by: Adrian Bunk <
[email protected]
>
drivers/net/e100.c
patch
|
blob
|
history
diff --git
a/drivers/net/e100.c
b/drivers/net/e100.c
index 03bf164f9e8db32f3eb1fdafe1e3fffb0b3d26fb..c2ae2a24629b35bffd9d348866229a7a24b4e219 100644
(file)
--- a/
drivers/net/e100.c
+++ b/
drivers/net/e100.c
@@
-1930,9
+1930,8
@@
static int e100_rx_alloc_list(struct nic *nic)
nic->rx_to_use = nic->rx_to_clean = NULL;
nic->ru_running = RU_UNINITIALIZED;
- if(!(nic->rxs = k
malloc(sizeof(struct rx) * count
, GFP_ATOMIC)))
+ if(!(nic->rxs = k
calloc(count, sizeof(struct rx)
, GFP_ATOMIC)))
return -ENOMEM;
- memset(nic->rxs, 0, sizeof(struct rx) * count);
for(rx = nic->rxs, i = 0; i < count; rx++, i++) {
rx->next = (i + 1 < count) ? rx + 1 : nic->rxs;