]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
net/ipv6/ip6mr.c: Use kmem_cache_zalloc, remove memset
authorJoe Perches <joe@perches.com>
Thu, 4 Dec 2008 06:27:25 +0000 (22:27 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 4 Dec 2008 06:27:25 +0000 (22:27 -0800)
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ip6mr.c

index 1446bec895a2c062e61640ffd6b330cc9bb443c0..d1008e6891e7c2de56a89ceb229cbd1ab7c34f31 100644 (file)
@@ -692,20 +692,18 @@ static struct mfc6_cache *ip6mr_cache_find(struct in6_addr *origin, struct in6_a
  */
 static struct mfc6_cache *ip6mr_cache_alloc(void)
 {
-       struct mfc6_cache *c = kmem_cache_alloc(mrt_cachep, GFP_KERNEL);
+       struct mfc6_cache *c = kmem_cache_zalloc(mrt_cachep, GFP_KERNEL);
        if (c == NULL)
                return NULL;
-       memset(c, 0, sizeof(*c));
        c->mfc_un.res.minvif = MAXMIFS;
        return c;
 }
 
 static struct mfc6_cache *ip6mr_cache_alloc_unres(void)
 {
-       struct mfc6_cache *c = kmem_cache_alloc(mrt_cachep, GFP_ATOMIC);
+       struct mfc6_cache *c = kmem_cache_zalloc(mrt_cachep, GFP_ATOMIC);
        if (c == NULL)
                return NULL;
-       memset(c, 0, sizeof(*c));
        skb_queue_head_init(&c->mfc_un.unres.unresolved);
        c->mfc_un.unres.expires = jiffies + 10 * HZ;
        return c;