aboutsummaryrefslogtreecommitdiffstats
path: root/net/decnet/dn_table.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@mandriva.com>2006-11-20 22:16:24 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-03 00:30:15 -0500
commite6b61105f6b06a1d6bb35d2a0978cf91106808b8 (patch)
tree49e7d0d24679876f9045134893bb11f9af211c02 /net/decnet/dn_table.c
parentb1a98bf685e26f1a0b509d6f0f6bd8f7764303a5 (diff)
[DECNET]: Use kzalloc where applicable
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Diffstat (limited to 'net/decnet/dn_table.c')
-rw-r--r--net/decnet/dn_table.c8
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;