diff options
author | Arnaldo Carvalho de Melo <acme@mandriva.com> | 2006-11-21 01:16:24 -0200 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-02 21:30:15 -0800 |
commit | e6b61105f6b06a1d6bb35d2a0978cf91106808b8 (patch) | |
tree | 49e7d0d24679876f9045134893bb11f9af211c02 /net/decnet | |
parent | b1a98bf685e26f1a0b509d6f0f6bd8f7764303a5 (diff) | |
download | linux-stable-e6b61105f6b06a1d6bb35d2a0978cf91106808b8.tar.gz linux-stable-e6b61105f6b06a1d6bb35d2a0978cf91106808b8.tar.bz2 linux-stable-e6b61105f6b06a1d6bb35d2a0978cf91106808b8.zip |
[DECNET]: Use kzalloc where applicable
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Diffstat (limited to 'net/decnet')
-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) printk(KERN_DEBUG "DECnet: BUG! Attempt to create routing table from interrupt\n"); return NULL; } - if ((t = kmalloc(sizeof(struct dn_fib_table) + sizeof(struct dn_hash), GFP_KERNEL)) == NULL) - return NULL; - memset(t, 0, sizeof(struct dn_fib_table)); + t = kzalloc(sizeof(struct dn_fib_table) + sizeof(struct dn_hash), + GFP_KERNEL); + if (t == NULL) + return NULL; t->n = n; t->insert = dn_fib_table_insert; @@ -842,7 +843,6 @@ struct dn_fib_table *dn_fib_get_table(u32 n, int create) t->lookup = dn_fib_table_lookup; t->flush = dn_fib_table_flush; t->dump = dn_fib_table_dump; - memset(t->data, 0, sizeof(struct dn_hash)); hlist_add_head_rcu(&t->hlist, &dn_fib_table_hash[h]); return t; |