diff options
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_profile.c')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_profile.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_profile.c b/drivers/infiniband/hw/mthca/mthca_profile.c index bd1338682074..08a909371b0a 100644 --- a/drivers/infiniband/hw/mthca/mthca_profile.c +++ b/drivers/infiniband/hw/mthca/mthca_profile.c | |||
@@ -82,12 +82,10 @@ u64 mthca_make_profile(struct mthca_dev *dev, | |||
82 | struct mthca_resource tmp; | 82 | struct mthca_resource tmp; |
83 | int i, j; | 83 | int i, j; |
84 | 84 | ||
85 | profile = kmalloc(MTHCA_RES_NUM * sizeof *profile, GFP_KERNEL); | 85 | profile = kzalloc(MTHCA_RES_NUM * sizeof *profile, GFP_KERNEL); |
86 | if (!profile) | 86 | if (!profile) |
87 | return -ENOMEM; | 87 | return -ENOMEM; |
88 | 88 | ||
89 | memset(profile, 0, MTHCA_RES_NUM * sizeof *profile); | ||
90 | |||
91 | profile[MTHCA_RES_QP].size = dev_lim->qpc_entry_sz; | 89 | profile[MTHCA_RES_QP].size = dev_lim->qpc_entry_sz; |
92 | profile[MTHCA_RES_EEC].size = dev_lim->eec_entry_sz; | 90 | profile[MTHCA_RES_EEC].size = dev_lim->eec_entry_sz; |
93 | profile[MTHCA_RES_SRQ].size = dev_lim->srq_entry_sz; | 91 | profile[MTHCA_RES_SRQ].size = dev_lim->srq_entry_sz; |