summaryrefslogtreecommitdiffstats
path: root/net/ax25/ax25_dev.c
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/ax25/ax25_dev.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/ax25/ax25_dev.c')
-rw-r--r--net/ax25/ax25_dev.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/ax25/ax25_dev.c b/net/ax25/ax25_dev.c
index 47e6e790bd6..b787678220f 100644
--- a/net/ax25/ax25_dev.c
+++ b/net/ax25/ax25_dev.c
@@ -55,15 +55,13 @@ void ax25_dev_device_up(struct net_device *dev)
{
ax25_dev *ax25_dev;
- if ((ax25_dev = kmalloc(sizeof(*ax25_dev), GFP_ATOMIC)) == NULL) {
+ if ((ax25_dev = kzalloc(sizeof(*ax25_dev), GFP_ATOMIC)) == NULL) {
printk(KERN_ERR "AX.25: ax25_dev_device_up - out of memory\n");
return;
}
ax25_unregister_sysctl();
- memset(ax25_dev, 0x00, sizeof(*ax25_dev));
-
dev->ax25_ptr = ax25_dev;
ax25_dev->dev = dev;
dev_hold(dev);