[AX.25]: Use kzalloc

Replace kzalloc instead of kmalloc + memset.

Signed-off-by: Ralf Baechle <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
Ralf Baechle 2006-07-09 12:14:22 -07:00 • committed by David S. Miller
commit 1b30dd359e
4 changed files with 4 additions and 10 deletions

View file

@ -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;