treewide: kzalloc() -> kcalloc()
[linux-2.6-block.git] / drivers / mtd / ofpart.c
index 615f8c173162cb2a7e48301f365fbbfc667db81c..6b21a92d3622a10da833b6357b58d9e5b0c2e668 100644 (file)
@@ -71,7 +71,7 @@ static int parse_fixed_partitions(struct mtd_info *master,
        if (nr_parts == 0)
                return 0;
 
-       parts = kzalloc(nr_parts * sizeof(*parts), GFP_KERNEL);
+       parts = kcalloc(nr_parts, sizeof(*parts), GFP_KERNEL);
        if (!parts)
                return -ENOMEM;
 
@@ -177,7 +177,7 @@ static int parse_ofoldpart_partitions(struct mtd_info *master,
 
        nr_parts = plen / sizeof(part[0]);
 
-       parts = kzalloc(nr_parts * sizeof(*parts), GFP_KERNEL);
+       parts = kcalloc(nr_parts, sizeof(*parts), GFP_KERNEL);
        if (!parts)
                return -ENOMEM;