Merge to Fedora kernel-2.6.18-1.2224_FC5 patched with stable patch-2.6.18.1-vs2.0...
[linux-2.6.git] / net / ax25 / sysctl_net_ax25.c
index bdb64c3..867d425 100644 (file)
@@ -6,7 +6,6 @@
  *
  * Copyright (C) 1996 Mike Shaver (shaver@zeroknowledge.com)
  */
-#include <linux/config.h>
 #include <linux/mm.h>
 #include <linux/sysctl.h>
 #include <linux/spinlock.h>
@@ -204,13 +203,11 @@ void ax25_register_sysctl(void)
        for (ax25_table_size = sizeof(ctl_table), ax25_dev = ax25_dev_list; ax25_dev != NULL; ax25_dev = ax25_dev->next)
                ax25_table_size += sizeof(ctl_table);
 
-       if ((ax25_table = kmalloc(ax25_table_size, GFP_ATOMIC)) == NULL) {
+       if ((ax25_table = kzalloc(ax25_table_size, GFP_ATOMIC)) == NULL) {
                spin_unlock_bh(&ax25_dev_lock);
                return;
        }
 
-       memset(ax25_table, 0x00, ax25_table_size);
-
        for (n = 0, ax25_dev = ax25_dev_list; ax25_dev != NULL; ax25_dev = ax25_dev->next) {
                ctl_table *child = kmalloc(sizeof(ax25_param_table), GFP_ATOMIC);
                if (!child) {