treewide: devm_kzalloc() -> devm_kcalloc()
[linux-2.6-microblaze.git] / drivers / misc / sram.c
index fc04157..c5dc609 100644 (file)
@@ -185,7 +185,7 @@ static int sram_reserve_regions(struct sram_dev *sram, struct resource *res)
         * after the reserved blocks from the dt are processed.
         */
        nblocks = (np) ? of_get_available_child_count(np) + 1 : 1;
-       rblocks = kzalloc((nblocks) * sizeof(*rblocks), GFP_KERNEL);
+       rblocks = kcalloc(nblocks, sizeof(*rblocks), GFP_KERNEL);
        if (!rblocks)
                return -ENOMEM;
 
@@ -264,8 +264,8 @@ static int sram_reserve_regions(struct sram_dev *sram, struct resource *res)
        list_sort(NULL, &reserve_list, sram_reserve_cmp);
 
        if (exports) {
-               sram->partition = devm_kzalloc(sram->dev,
-                                      exports * sizeof(*sram->partition),
+               sram->partition = devm_kcalloc(sram->dev,
+                                      exports, sizeof(*sram->partition),
                                       GFP_KERNEL);
                if (!sram->partition) {
                        ret = -ENOMEM;