treewide: kzalloc() -> kcalloc()
[linux-2.6-microblaze.git] / drivers / scsi / esas2r / esas2r_init.c
index 9db645d..bbe77db 100644 (file)
@@ -833,7 +833,7 @@ bool esas2r_init_adapter_struct(struct esas2r_adapter *a,
 
        /* allocate requests for asynchronous events */
        a->first_ae_req =
-               kzalloc(num_ae_requests * sizeof(struct esas2r_request),
+               kcalloc(num_ae_requests, sizeof(struct esas2r_request),
                        GFP_KERNEL);
 
        if (a->first_ae_req == NULL) {
@@ -843,8 +843,8 @@ bool esas2r_init_adapter_struct(struct esas2r_adapter *a,
        }
 
        /* allocate the S/G list memory descriptors */
-       a->sg_list_mds = kzalloc(
-               num_sg_lists * sizeof(struct esas2r_mem_desc), GFP_KERNEL);
+       a->sg_list_mds = kcalloc(num_sg_lists, sizeof(struct esas2r_mem_desc),
+                                GFP_KERNEL);
 
        if (a->sg_list_mds == NULL) {
                esas2r_log(ESAS2R_LOG_CRIT,
@@ -854,8 +854,9 @@ bool esas2r_init_adapter_struct(struct esas2r_adapter *a,
 
        /* allocate the request table */
        a->req_table =
-               kzalloc((num_requests + num_ae_requests +
-                        1) * sizeof(struct esas2r_request *), GFP_KERNEL);
+               kcalloc(num_requests + num_ae_requests + 1,
+                       sizeof(struct esas2r_request *),
+                       GFP_KERNEL);
 
        if (a->req_table == NULL) {
                esas2r_log(ESAS2R_LOG_CRIT,