Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
[linux-2.6-microblaze.git] / drivers / mtd / maps / physmap_of_core.c
index 527b168..4129535 100644 (file)
@@ -124,7 +124,7 @@ static const char * const *of_get_probes(struct device_node *dp)
        if (count < 0)
                return part_probe_types_def;
 
-       res = kzalloc((count + 1) * sizeof(*res), GFP_KERNEL);
+       res = kcalloc(count + 1, sizeof(*res), GFP_KERNEL);
        if (!res)
                return NULL;
 
@@ -197,7 +197,7 @@ static int of_flash_probe(struct platform_device *dev)
 
        dev_set_drvdata(&dev->dev, info);
 
-       mtd_list = kzalloc(sizeof(*mtd_list) * count, GFP_KERNEL);
+       mtd_list = kcalloc(count, sizeof(*mtd_list), GFP_KERNEL);
        if (!mtd_list)
                goto err_flash_remove;