summaryrefslogtreecommitdiffstats
path: root/net/netrom
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2006-07-09 12:14:22 -0700
committerDavid S. Miller <davem@davemloft.net>2006-07-09 12:14:22 -0700
commit1b30dd359ebec22d035e8b145751319f63772ca1 (patch)
tree1efbdc5573940817dac79672357e1c2fa1ed6a28 /net/netrom
parent24781734643ea2e9fd864f58000e47793e2dcb04 (diff)
downloadop-kernel-dev-1b30dd359ebec22d035e8b145751319f63772ca1.zip
op-kernel-dev-1b30dd359ebec22d035e8b145751319f63772ca1.tar.gz
[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')
-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 389a411..ecc7968 100644
--- a/net/netrom/af_netrom.c
+++ b/net/netrom/af_netrom.c
@@ -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;
OpenPOWER on IntegriCloud