diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-11-21 19:15:06 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-11-28 01:53:38 -0500 |
commit | 89bf67f1f080c947c92f8773482d9e57767ca292 (patch) | |
tree | ae492f5f31a32a4f838778cd34320da0bedf9dfd /drivers/net/cxgb4 | |
parent | fe6d2a38b2076cba515dc95b5dc1589a7ab51c17 (diff) |
drivers/net: use vzalloc()
Use vzalloc() and vzalloc_node() in net drivers
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/cxgb4')
-rw-r--r-- | drivers/net/cxgb4/cxgb4_main.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/cxgb4/cxgb4_main.c b/drivers/net/cxgb4/cxgb4_main.c index f50bc98310f8..848f89d19fb7 100644 --- a/drivers/net/cxgb4/cxgb4_main.c +++ b/drivers/net/cxgb4/cxgb4_main.c | |||
@@ -868,12 +868,10 @@ out: release_firmware(fw); | |||
868 | */ | 868 | */ |
869 | void *t4_alloc_mem(size_t size) | 869 | void *t4_alloc_mem(size_t size) |
870 | { | 870 | { |
871 | void *p = kmalloc(size, GFP_KERNEL); | 871 | void *p = kzalloc(size, GFP_KERNEL); |
872 | 872 | ||
873 | if (!p) | 873 | if (!p) |
874 | p = vmalloc(size); | 874 | p = vzalloc(size); |
875 | if (p) | ||
876 | memset(p, 0, size); | ||
877 | return p; | 875 | return p; |
878 | } | 876 | } |
879 | 877 | ||