summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/mtd/maps/pmcmsp-flash.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/mtd/maps/pmcmsp-flash.c')
-rw-r--r--kernel/drivers/mtd/maps/pmcmsp-flash.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/drivers/mtd/maps/pmcmsp-flash.c b/kernel/drivers/mtd/maps/pmcmsp-flash.c
index 744ca5cac..f9fa3fad7 100644
--- a/kernel/drivers/mtd/maps/pmcmsp-flash.c
+++ b/kernel/drivers/mtd/maps/pmcmsp-flash.c
@@ -75,15 +75,15 @@ static int __init init_msp_flash(void)
printk(KERN_NOTICE "Found %d PMC flash devices\n", fcnt);
- msp_flash = kmalloc(fcnt * sizeof(struct map_info *), GFP_KERNEL);
+ msp_flash = kcalloc(fcnt, sizeof(*msp_flash), GFP_KERNEL);
if (!msp_flash)
return -ENOMEM;
- msp_parts = kmalloc(fcnt * sizeof(struct mtd_partition *), GFP_KERNEL);
+ msp_parts = kcalloc(fcnt, sizeof(*msp_parts), GFP_KERNEL);
if (!msp_parts)
goto free_msp_flash;
- msp_maps = kcalloc(fcnt, sizeof(struct mtd_info), GFP_KERNEL);
+ msp_maps = kcalloc(fcnt, sizeof(*msp_maps), GFP_KERNEL);
if (!msp_maps)
goto free_msp_parts;