diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-11-22 01:15:06 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-11-28 07:53:38 +0100 |
commit | 89bf67f1f080c947c92f8773482d9e57767ca292 (patch) | |
tree | ae492f5f31a32a4f838778cd34320da0bedf9dfd /drivers/net/cxgb4 | |
parent | be2net: adding support for Lancer family of CNAs (diff) | |
download | linux-89bf67f1f080c947c92f8773482d9e57767ca292.tar.xz linux-89bf67f1f080c947c92f8773482d9e57767ca292.zip |
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); */ void *t4_alloc_mem(size_t size) { - void *p = kmalloc(size, GFP_KERNEL); + void *p = kzalloc(size, GFP_KERNEL); if (!p) - p = vmalloc(size); - if (p) - memset(p, 0, size); + p = vzalloc(size); return p; } |