diff options
Diffstat (limited to 'net/decnet/dn_table.c')
| -rw-r--r-- | net/decnet/dn_table.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/decnet/dn_table.c b/net/decnet/dn_table.c index 9ce58c24a8d3..bdbc3f431668 100644 --- a/net/decnet/dn_table.c +++ b/net/decnet/dn_table.c | |||
| @@ -831,10 +831,11 @@ struct dn_fib_table *dn_fib_get_table(u32 n, int create) | |||
| 831 | printk(KERN_DEBUG "DECnet: BUG! Attempt to create routing table from interrupt\n"); | 831 | printk(KERN_DEBUG "DECnet: BUG! Attempt to create routing table from interrupt\n"); |
| 832 | return NULL; | 832 | return NULL; |
| 833 | } | 833 | } |
| 834 | if ((t = kmalloc(sizeof(struct dn_fib_table) + sizeof(struct dn_hash), GFP_KERNEL)) == NULL) | ||
| 835 | return NULL; | ||
| 836 | 834 | ||
| 837 | memset(t, 0, sizeof(struct dn_fib_table)); | 835 | t = kzalloc(sizeof(struct dn_fib_table) + sizeof(struct dn_hash), |
| 836 | GFP_KERNEL); | ||
| 837 | if (t == NULL) | ||
| 838 | return NULL; | ||
| 838 | 839 | ||
| 839 | t->n = n; | 840 | t->n = n; |
| 840 | t->insert = dn_fib_table_insert; | 841 | t->insert = dn_fib_table_insert; |
| @@ -842,7 +843,6 @@ struct dn_fib_table *dn_fib_get_table(u32 n, int create) | |||
| 842 | t->lookup = dn_fib_table_lookup; | 843 | t->lookup = dn_fib_table_lookup; |
| 843 | t->flush = dn_fib_table_flush; | 844 | t->flush = dn_fib_table_flush; |
| 844 | t->dump = dn_fib_table_dump; | 845 | t->dump = dn_fib_table_dump; |
| 845 | memset(t->data, 0, sizeof(struct dn_hash)); | ||
| 846 | hlist_add_head_rcu(&t->hlist, &dn_fib_table_hash[h]); | 846 | hlist_add_head_rcu(&t->hlist, &dn_fib_table_hash[h]); |
| 847 | 847 | ||
| 848 | return t; | 848 | return t; |
