[AX.25]: Use kzalloc

Replace kzalloc instead of kmalloc + memset.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Ralf Baechle
2006-07-09 12:14:22 -07:00
committed by David S. Miller
szülő 2478173464
commit 1b30dd359e
4 fájl változott, egészen pontosan 4 új sor hozzáadva és 10 régi sor törölve

Fájl megtekintése

@@ -1382,14 +1382,12 @@ static int __init nr_proto_init(void)
return -1;
}
dev_nr = kmalloc(nr_ndevs * sizeof(struct net_device *), GFP_KERNEL);
dev_nr = kzalloc(nr_ndevs * sizeof(struct net_device *), GFP_KERNEL);
if (dev_nr == NULL) {
printk(KERN_ERR "NET/ROM: nr_proto_init - unable to allocate device array\n");
return -1;
}
memset(dev_nr, 0x00, nr_ndevs * sizeof(struct net_device *));
for (i = 0; i < nr_ndevs; i++) {
char name[IFNAMSIZ];
struct net_device *dev;