]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ax25/ax25_dev.c
[AX25] af_ax25: Possible circular locking.
[linux-2.6-omap-h63xx.git] / net / ax25 / ax25_dev.c
index 47e6e790bd67951025681549b3b6d034fe8d0d9e..528c874d9828df06f6d2c880b808d31da4164041 100644 (file)
@@ -11,7 +11,6 @@
 #include <linux/socket.h>
 #include <linux/in.h>
 #include <linux/kernel.h>
-#include <linux/sched.h>
 #include <linux/timer.h>
 #include <linux/string.h>
 #include <linux/sockios.h>
@@ -55,15 +54,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);