diff options
author | Yan Burman <burman.yan@gmail.com> | 2006-12-12 14:03:10 -0500 |
---|---|---|
committer | Adrian Bunk <bunk@stusta.de> | 2006-12-12 14:03:10 -0500 |
commit | c48e3fca3f063edb0c8c4d163e880b94c1d9f93d (patch) | |
tree | 2ac5c362c1cdbaad1b6187a606733495f963a85c /drivers | |
parent | 0268bd0a807fc5cc41ced9cce95efe1b43e8fa52 (diff) |
e100: replace kmalloc with kcalloc
Replace kmalloc+memset with kcalloc
Signed-off-by: Yan Burman <burman.yan@gmail.com>
Acked-By: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/e100.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/e100.c b/drivers/net/e100.c index 03bf164f9e8d..c2ae2a24629b 100644 --- a/drivers/net/e100.c +++ b/drivers/net/e100.c | |||
@@ -1930,9 +1930,8 @@ static int e100_rx_alloc_list(struct nic *nic) | |||
1930 | nic->rx_to_use = nic->rx_to_clean = NULL; | 1930 | nic->rx_to_use = nic->rx_to_clean = NULL; |
1931 | nic->ru_running = RU_UNINITIALIZED; | 1931 | nic->ru_running = RU_UNINITIALIZED; |
1932 | 1932 | ||
1933 | if(!(nic->rxs = kmalloc(sizeof(struct rx) * count, GFP_ATOMIC))) | 1933 | if(!(nic->rxs = kcalloc(count, sizeof(struct rx), GFP_ATOMIC))) |
1934 | return -ENOMEM; | 1934 | return -ENOMEM; |
1935 | memset(nic->rxs, 0, sizeof(struct rx) * count); | ||
1936 | 1935 | ||
1937 | for(rx = nic->rxs, i = 0; i < count; rx++, i++) { | 1936 | for(rx = nic->rxs, i = 0; i < count; rx++, i++) { |
1938 | rx->next = (i + 1 < count) ? rx + 1 : nic->rxs; | 1937 | rx->next = (i + 1 < count) ? rx + 1 : nic->rxs; |