aboutsummaryrefslogtreecommitdiffstats
path: root/net/netrom/af_netrom.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2006-07-09 15:14:22 -0400
committerDavid S. Miller <davem@davemloft.net>2006-07-09 15:14:22 -0400
commit1b30dd359ebec22d035e8b145751319f63772ca1 (patch)
tree1efbdc5573940817dac79672357e1c2fa1ed6a28 /net/netrom/af_netrom.c
parent24781734643ea2e9fd864f58000e47793e2dcb04 (diff)
[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>
Diffstat (limited to 'net/netrom/af_netrom.c')
-rw-r--r--net/netrom/af_netrom.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c
index 389a4119e1b4..ecc796878f38 100644
--- a/net/netrom/af_netrom.c
+++ b/net/netrom/af_netrom.c
@@ -1382,14 +1382,12 @@ static int __init nr_proto_init(void)
1382 return -1; 1382 return -1;
1383 } 1383 }
1384 1384
1385 dev_nr = kmalloc(nr_ndevs * sizeof(struct net_device *), GFP_KERNEL); 1385 dev_nr = kzalloc(nr_ndevs * sizeof(struct net_device *), GFP_KERNEL);
1386 if (dev_nr == NULL) { 1386 if (dev_nr == NULL) {
1387 printk(KERN_ERR "NET/ROM: nr_proto_init - unable to allocate device array\n"); 1387 printk(KERN_ERR "NET/ROM: nr_proto_init - unable to allocate device array\n");
1388 return -1; 1388 return -1;
1389 } 1389 }
1390 1390
1391 memset(dev_nr, 0x00, nr_ndevs * sizeof(struct net_device *));
1392
1393 for (i = 0; i < nr_ndevs; i++) { 1391 for (i = 0; i < nr_ndevs; i++) {
1394 char name[IFNAMSIZ]; 1392 char name[IFNAMSIZ];
1395 struct net_device *dev; 1393 struct net_device *dev;