diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c index 3549f3b425929434fd334fd9630fc9e85ca25e68..73696b4a2eed42caafc4d7414f8ae38c6c3a6922 100644 --- a/arch/ia64/pci/pci.c +++ b/arch/ia64/pci/pci.c @@ -354,10 +354,13 @@ pci_acpi_scan_root(struct acpi_device *device, int domain, int bus) acpi_walk_resources(device->handle, METHOD_NAME__CRS, count_window, &windows); - controller->window = kmalloc_node(sizeof(*controller->window) * windows, - GFP_KERNEL, controller->node); - if (!controller->window) - goto out2; + if (windows) { + controller->window = + kmalloc_node(sizeof(*controller->window) * windows, + GFP_KERNEL, controller->node); + if (!controller->window) + goto out2; + } name = kmalloc(16, GFP_KERNEL); if (!name)