summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ofpart.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/ofpart.c')
-rw-r--r--drivers/mtd/ofpart.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/ofpart.c b/drivers/mtd/ofpart.c
index 615f8c173162..6b21a92d3622 100644
--- a/drivers/mtd/ofpart.c
+++ b/drivers/mtd/ofpart.c
@@ -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;