Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband
[linux-2.6.git] / drivers / infiniband / hw / mthca / mthca_profile.c
index bd1338682074bff3f01e3c7fd66945b57429e5a8..08a909371b0a1060634526b53819314497fcd04a 100644 (file)
@@ -82,12 +82,10 @@ u64 mthca_make_profile(struct mthca_dev *dev,
        struct mthca_resource tmp;
        int i, j;
 
-       profile = kmalloc(MTHCA_RES_NUM * sizeof *profile, GFP_KERNEL);
+       profile = kzalloc(MTHCA_RES_NUM * sizeof *profile, GFP_KERNEL);
        if (!profile)
                return -ENOMEM;
 
-       memset(profile, 0, MTHCA_RES_NUM * sizeof *profile);
-
        profile[MTHCA_RES_QP].size   = dev_lim->qpc_entry_sz;
        profile[MTHCA_RES_EEC].size  = dev_lim->eec_entry_sz;
        profile[MTHCA_RES_SRQ].size  = dev_lim->srq_entry_sz;