From c376222960ae91d5ffb9197ee36771aaed1d9f90 Mon Sep 17 00:00:00 2001 From: "Robert P. J. Day" Date: Sat, 10 Feb 2007 01:45:03 -0800 Subject: [PATCH] Transform kmem_cache_alloc()+memset(0) -> kmem_cache_zalloc(). Replace appropriate pairs of "kmem_cache_alloc()" + "memset(0)" with the corresponding "kmem_cache_zalloc()" call. Signed-off-by: Robert P. J. Day Cc: "Luck, Tony" Cc: Andi Kleen Cc: Roland McGrath Cc: James Bottomley Cc: Greg KH Acked-by: Joel Becker Cc: Steven Whitehouse Cc: Jan Kara Cc: Michael Halcrow Cc: "David S. Miller" Cc: Stephen Smalley Cc: James Morris Cc: Chris Wright Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- net/decnet/dn_table.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'net/decnet/dn_table.c') diff --git a/net/decnet/dn_table.c b/net/decnet/dn_table.c index c1f0cc1b1c60..720501e1ae20 100644 --- a/net/decnet/dn_table.c +++ b/net/decnet/dn_table.c @@ -593,12 +593,10 @@ create: replace: err = -ENOBUFS; - new_f = kmem_cache_alloc(dn_hash_kmem, GFP_KERNEL); + new_f = kmem_cache_zalloc(dn_hash_kmem, GFP_KERNEL); if (new_f == NULL) goto out; - memset(new_f, 0, sizeof(struct dn_fib_node)); - new_f->fn_key = key; new_f->fn_type = type; new_f->fn_scope = r->rtm_scope; -- cgit v1.2.3