diff options
Diffstat (limited to 'drivers/infiniband/hw/ehca/ehca_cq.c')
-rw-r--r-- | drivers/infiniband/hw/ehca/ehca_cq.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_cq.c b/drivers/infiniband/hw/ehca/ehca_cq.c index 9291a86ca053..6ebfa27e4e16 100644 --- a/drivers/infiniband/hw/ehca/ehca_cq.c +++ b/drivers/infiniband/hw/ehca/ehca_cq.c | |||
@@ -134,14 +134,13 @@ struct ib_cq *ehca_create_cq(struct ib_device *device, int cqe, | |||
134 | if (cqe >= 0xFFFFFFFF - 64 - additional_cqe) | 134 | if (cqe >= 0xFFFFFFFF - 64 - additional_cqe) |
135 | return ERR_PTR(-EINVAL); | 135 | return ERR_PTR(-EINVAL); |
136 | 136 | ||
137 | my_cq = kmem_cache_alloc(cq_cache, GFP_KERNEL); | 137 | my_cq = kmem_cache_zalloc(cq_cache, GFP_KERNEL); |
138 | if (!my_cq) { | 138 | if (!my_cq) { |
139 | ehca_err(device, "Out of memory for ehca_cq struct device=%p", | 139 | ehca_err(device, "Out of memory for ehca_cq struct device=%p", |
140 | device); | 140 | device); |
141 | return ERR_PTR(-ENOMEM); | 141 | return ERR_PTR(-ENOMEM); |
142 | } | 142 | } |
143 | 143 | ||
144 | memset(my_cq, 0, sizeof(struct ehca_cq)); | ||
145 | memset(¶m, 0, sizeof(struct ehca_alloc_cq_parms)); | 144 | memset(¶m, 0, sizeof(struct ehca_alloc_cq_parms)); |
146 | 145 | ||
147 | spin_lock_init(&my_cq->spinlock); | 146 | spin_lock_init(&my_cq->spinlock); |