Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
[powerpc.git] / net / ipv4 / ipmr.c
index a099000..604f5b5 100644 (file)
@@ -479,20 +479,18 @@ static struct mfc_cache *ipmr_cache_find(__be32 origin, __be32 mcastgrp)
  */
 static struct mfc_cache *ipmr_cache_alloc(void)
 {
-       struct mfc_cache *c=kmem_cache_alloc(mrt_cachep, GFP_KERNEL);
+       struct mfc_cache *c=kmem_cache_zalloc(mrt_cachep, GFP_KERNEL);
        if(c==NULL)
                return NULL;
-       memset(c, 0, sizeof(*c));
        c->mfc_un.res.minvif = MAXVIFS;
        return c;
 }
 
 static struct mfc_cache *ipmr_cache_alloc_unres(void)
 {
-       struct mfc_cache *c=kmem_cache_alloc(mrt_cachep, GFP_ATOMIC);
+       struct mfc_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;