treewide: kzalloc() -> kcalloc()
[linux-2.6-microblaze.git] / drivers / infiniband / hw / ocrdma / ocrdma_main.c
index eb8b6a9..5962c0e 100644 (file)
@@ -221,19 +221,20 @@ static int ocrdma_register_device(struct ocrdma_dev *dev)
 static int ocrdma_alloc_resources(struct ocrdma_dev *dev)
 {
        mutex_init(&dev->dev_lock);
-       dev->cq_tbl = kzalloc(sizeof(struct ocrdma_cq *) *
-                             OCRDMA_MAX_CQ, GFP_KERNEL);
+       dev->cq_tbl = kcalloc(OCRDMA_MAX_CQ, sizeof(struct ocrdma_cq *),
+                             GFP_KERNEL);
        if (!dev->cq_tbl)
                goto alloc_err;
 
        if (dev->attr.max_qp) {
-               dev->qp_tbl = kzalloc(sizeof(struct ocrdma_qp *) *
-                                     OCRDMA_MAX_QP, GFP_KERNEL);
+               dev->qp_tbl = kcalloc(OCRDMA_MAX_QP,
+                                     sizeof(struct ocrdma_qp *),
+                                     GFP_KERNEL);
                if (!dev->qp_tbl)
                        goto alloc_err;
        }
 
-       dev->stag_arr = kzalloc(sizeof(u64) * OCRDMA_MAX_STAG, GFP_KERNEL);
+       dev->stag_arr = kcalloc(OCRDMA_MAX_STAG, sizeof(u64), GFP_KERNEL);
        if (dev->stag_arr == NULL)
                goto alloc_err;