EDAC: Use kcalloc()
[linux-2.6-microblaze.git] / drivers / edac / edac_device.c
index b737349..19522c5 100644 (file)
@@ -70,26 +70,21 @@ edac_device_alloc_ctl_info(unsigned pvt_sz, char *dev_name, unsigned nr_instance
        if (!dev_ctl)
                return NULL;
 
-       dev_inst = kmalloc_array(nr_instances,
-                                sizeof(struct edac_device_instance),
-                                GFP_KERNEL | __GFP_ZERO);
+       dev_inst = kcalloc(nr_instances, sizeof(struct edac_device_instance), GFP_KERNEL);
        if (!dev_inst)
                goto free;
 
        dev_ctl->instances = dev_inst;
 
-       dev_blk = kmalloc_array(nr_instances * nr_blocks,
-                               sizeof(struct edac_device_block),
-                               GFP_KERNEL | __GFP_ZERO);
+       dev_blk = kcalloc(nr_instances * nr_blocks, sizeof(struct edac_device_block), GFP_KERNEL);
        if (!dev_blk)
                goto free;
 
        dev_ctl->blocks = dev_blk;
 
        if (nr_attrib) {
-               dev_attrib = kmalloc_array(nr_attrib,
-                                          sizeof(struct edac_dev_sysfs_block_attribute),
-                                          GFP_KERNEL | __GFP_ZERO);
+               dev_attrib = kcalloc(nr_attrib, sizeof(struct edac_dev_sysfs_block_attribute),
+                                    GFP_KERNEL);
                if (!dev_attrib)
                        goto free;