diff options
Diffstat (limited to 'net/ax25/sysctl_net_ax25.c')
| -rw-r--r-- | net/ax25/sysctl_net_ax25.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/net/ax25/sysctl_net_ax25.c b/net/ax25/sysctl_net_ax25.c index bdb64c36df12..867d42537979 100644 --- a/net/ax25/sysctl_net_ax25.c +++ b/net/ax25/sysctl_net_ax25.c | |||
| @@ -6,7 +6,6 @@ | |||
| 6 | * | 6 | * |
| 7 | * Copyright (C) 1996 Mike Shaver (shaver@zeroknowledge.com) | 7 | * Copyright (C) 1996 Mike Shaver (shaver@zeroknowledge.com) |
| 8 | */ | 8 | */ |
| 9 | #include <linux/config.h> | ||
| 10 | #include <linux/mm.h> | 9 | #include <linux/mm.h> |
| 11 | #include <linux/sysctl.h> | 10 | #include <linux/sysctl.h> |
| 12 | #include <linux/spinlock.h> | 11 | #include <linux/spinlock.h> |
| @@ -204,13 +203,11 @@ void ax25_register_sysctl(void) | |||
| 204 | for (ax25_table_size = sizeof(ctl_table), ax25_dev = ax25_dev_list; ax25_dev != NULL; ax25_dev = ax25_dev->next) | 203 | for (ax25_table_size = sizeof(ctl_table), ax25_dev = ax25_dev_list; ax25_dev != NULL; ax25_dev = ax25_dev->next) |
| 205 | ax25_table_size += sizeof(ctl_table); | 204 | ax25_table_size += sizeof(ctl_table); |
| 206 | 205 | ||
| 207 | if ((ax25_table = kmalloc(ax25_table_size, GFP_ATOMIC)) == NULL) { | 206 | if ((ax25_table = kzalloc(ax25_table_size, GFP_ATOMIC)) == NULL) { |
| 208 | spin_unlock_bh(&ax25_dev_lock); | 207 | spin_unlock_bh(&ax25_dev_lock); |
| 209 | return; | 208 | return; |
| 210 | } | 209 | } |
| 211 | 210 | ||
| 212 | memset(ax25_table, 0x00, ax25_table_size); | ||
| 213 | |||
| 214 | for (n = 0, ax25_dev = ax25_dev_list; ax25_dev != NULL; ax25_dev = ax25_dev->next) { | 211 | for (n = 0, ax25_dev = ax25_dev_list; ax25_dev != NULL; ax25_dev = ax25_dev->next) { |
| 215 | ctl_table *child = kmalloc(sizeof(ax25_param_table), GFP_ATOMIC); | 212 | ctl_table *child = kmalloc(sizeof(ax25_param_table), GFP_ATOMIC); |
| 216 | if (!child) { | 213 | if (!child) { |
