From: Paolo 'Blaisorblade' Giarrusso Date: Fri, 7 Apr 2006 05:38:28 +0000 (-0700) Subject: [NET] kzalloc: use in alloc_netdev X-Git-Tag: v2.6.17-rc2~291^2~8 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=31380de95cc3183bbb379339e67f83d69e56fbd6;p=linux-2.6 [NET] kzalloc: use in alloc_netdev Noticed this use, fixed it. Signed-off-by: Paolo 'Blaisorblade' Giarrusso Signed-off-by: David S. Miller --- diff --git a/net/core/dev.c b/net/core/dev.c index 434220d093..dfb6299886 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);