X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=arch%2Farm%2Fmach-iop13xx%2Fpci.c;h=99d94cb1bafdc6818e96d4edc6bc64fbeb152a71;hb=0d08a84770cb03aea24268e515342d44df8ea588;hp=306f82ee57f0a7a7e15e6f50ce34107922d51aa0;hpb=6cbdc8c5357276307a77deeada3f04626ff17da6;p=linux-2.6 diff --git a/arch/arm/mach-iop13xx/pci.c b/arch/arm/mach-iop13xx/pci.c index 306f82ee57..99d94cb1ba 100644 --- a/arch/arm/mach-iop13xx/pci.c +++ b/arch/arm/mach-iop13xx/pci.c @@ -19,10 +19,11 @@ #include #include - +#include #include #include #include +#include #include #include @@ -1001,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