diff options
Diffstat (limited to 'net/ax25/ax25_dev.c')
-rw-r--r-- | net/ax25/ax25_dev.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/ax25/ax25_dev.c b/net/ax25/ax25_dev.c index 47e6e790bd67..b787678220ff 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) | |||
55 | { | 55 | { |
56 | ax25_dev *ax25_dev; | 56 | ax25_dev *ax25_dev; |
57 | 57 | ||
58 | if ((ax25_dev = kmalloc(sizeof(*ax25_dev), GFP_ATOMIC)) == NULL) { | 58 | if ((ax25_dev = kzalloc(sizeof(*ax25_dev), GFP_ATOMIC)) == NULL) { |
59 | printk(KERN_ERR "AX.25: ax25_dev_device_up - out of memory\n"); | 59 | printk(KERN_ERR "AX.25: ax25_dev_device_up - out of memory\n"); |
60 | return; | 60 | return; |
61 | } | 61 | } |
62 | 62 | ||
63 | ax25_unregister_sysctl(); | 63 | ax25_unregister_sysctl(); |
64 | 64 | ||
65 | memset(ax25_dev, 0x00, sizeof(*ax25_dev)); | ||
66 | |||
67 | dev->ax25_ptr = ax25_dev; | 65 | dev->ax25_ptr = ax25_dev; |
68 | ax25_dev->dev = dev; | 66 | ax25_dev->dev = dev; |
69 | dev_hold(dev); | 67 | dev_hold(dev); |