diff options
author | Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> | 2006-04-06 22:38:28 -0700 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-04-09 22:25:47 -0700 |
commit | 31380de95cc3183bbb379339e67f83d69e56fbd6 (patch) | |
tree | 66eb2f4adf4ee02a0dffbe037f9340a3f7030544 /net | |
parent | 83b950c89c8cc0dcc1b079c638be25915c9945f1 (diff) | |
download | linux-stable-31380de95cc3183bbb379339e67f83d69e56fbd6.tar.gz linux-stable-31380de95cc3183bbb379339e67f83d69e56fbd6.tar.bz2 linux-stable-31380de95cc3183bbb379339e67f83d69e56fbd6.zip |
[NET] kzalloc: use in alloc_netdev
Noticed this use, fixed it.
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/dev.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 434220d093aa..dfb62998866a 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -3100,12 +3100,11 @@ struct net_device *alloc_netdev(int sizeof_priv, const char *name, alloc_size = (sizeof(*dev) + NETDEV_ALIGN_CONST) & ~NETDEV_ALIGN_CONST; alloc_size += sizeof_priv + NETDEV_ALIGN_CONST; - p = kmalloc(alloc_size, GFP_KERNEL); + p = kzalloc(alloc_size, GFP_KERNEL); if (!p) { printk(KERN_ERR "alloc_dev: Unable to allocate device.\n"); return NULL; } - memset(p, 0, alloc_size); dev = (struct net_device *) (((long)p + NETDEV_ALIGN_CONST) & ~NETDEV_ALIGN_CONST); |