linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / net / ax25 / ax25_dev.c
index b787678..dab77ef 100644 (file)
@@ -6,6 +6,7 @@
  *
  * Copyright (C) Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.uk)
  */
+#include <linux/config.h>
 #include <linux/errno.h>
 #include <linux/types.h>
 #include <linux/socket.h>
@@ -55,13 +56,15 @@ void ax25_dev_device_up(struct net_device *dev)
 {
        ax25_dev *ax25_dev;
 
-       if ((ax25_dev = kzalloc(sizeof(*ax25_dev), GFP_ATOMIC)) == NULL) {
+       if ((ax25_dev = kmalloc(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);