@@ -170,11 +170,10 @@ efct_hw_new_cq_set(struct hw_eq *eqs[],
cqs[i] = NULL;
for (i = 0; i < num_cqs; i++) {
- cq = kmalloc(sizeof(*cq), GFP_KERNEL);
+ cq = kzalloc(sizeof(*cq), GFP_KERNEL);
if (!cq)
goto error;
- memset(cq, 0, sizeof(*cq));
cqs[i] = cq;
cq->eq = eqs[i];
cq->type = SLI_QTYPE_CQ;
@@ -373,11 +372,10 @@ efct_hw_new_rq_set(struct hw_cq *cqs[],
rqs[i] = NULL;
for (i = 0, q_count = 0; i < num_rq_pairs; i++, q_count += 2) {
- rq = kmalloc(sizeof(*rq), GFP_KERNEL);
+ rq = kzalloc(sizeof(*rq), GFP_KERNEL);
if (!rq)
goto error;
- memset(rq, 0, sizeof(*rq));
rqs[i] = rq;
rq->instance = hw->hw_rq_count++;
rq->cq = cqs[i];