]> Pileus Git - ~andy/linux/blobdiff - arch/arm/mach-iop13xx/pci.c
sata_mv: fix compilation error when enabling DEBUG
[~andy/linux] / arch / arm / mach-iop13xx / pci.c
index 9d63d7f260ca5e1150513249d8b917ac4fdf041c..99d94cb1bafdc6818e96d4edc6bc64fbeb152a71 100644 (file)
@@ -1002,11 +1002,10 @@ int iop13xx_pci_setup(int nr, struct pci_sys_data *sys)
        if (nr > 1)
                return 0;
 
-       res = kmalloc(sizeof(struct resource) * 2, GFP_KERNEL);
+       res = kcalloc(2, sizeof(struct resource), GFP_KERNEL);
        if (!res)
                panic("PCI: unable to alloc resources");
 
-       memset(res, 0, sizeof(struct resource) * 2);
 
        /* 'nr' assumptions:
         * ATUX is always 0