Source
645
645
*
646
646
* Called by the PCI code when it finds an ITE821x controller.
647
647
* We then use the IDE PCI generic helper to do most of the work.
648
648
*/
649
649
650
650
static int it821x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
651
651
{
652
652
struct it821x_dev *itdevs;
653
653
int rc;
654
654
655
-
itdevs = kzalloc(2 * sizeof(*itdevs), GFP_KERNEL);
655
+
itdevs = kcalloc(2, sizeof(*itdevs), GFP_KERNEL);
656
656
if (itdevs == NULL) {
657
657
printk(KERN_ERR DRV_NAME " %s: out of memory\n", pci_name(dev));
658
658
return -ENOMEM;
659
659
}
660
660
661
661
itdevs->quirks = id->driver_data;
662
662
663
663
rc = ide_pci_init_one(dev, &it821x_chipset, itdevs);
664
664
if (rc)
665
665
kfree(itdevs);