aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/pci-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/pci-common.c')
-rw-r--r--arch/powerpc/kernel/pci-common.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index e640810e813f..2597f9545d8a 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -1047,10 +1047,8 @@ static void __devinit pcibios_fixup_bridge(struct pci_bus *bus)
1047 1047
1048 struct pci_dev *dev = bus->self; 1048 struct pci_dev *dev = bus->self;
1049 1049
1050 for (i = 0; i < PCI_BUS_NUM_RESOURCES; ++i) { 1050 pci_bus_for_each_resource(bus, res, i) {
1051 if ((res = bus->resource[i]) == NULL) 1051 if (!res || !res->flags)
1052 continue;
1053 if (!res->flags)
1054 continue; 1052 continue;
1055 if (i >= 3 && bus->self->transparent) 1053 if (i >= 3 && bus->self->transparent)
1056 continue; 1054 continue;
@@ -1277,9 +1275,8 @@ void pcibios_allocate_bus_resources(struct pci_bus *bus)
1277 pr_debug("PCI: Allocating bus resources for %04x:%02x...\n", 1275 pr_debug("PCI: Allocating bus resources for %04x:%02x...\n",
1278 pci_domain_nr(bus), bus->number); 1276 pci_domain_nr(bus), bus->number);
1279 1277
1280 for (i = 0; i < PCI_BUS_NUM_RESOURCES; ++i) { 1278 pci_bus_for_each_resource(bus, res, i) {
1281 if ((res = bus->resource[i]) == NULL || !res->flags 1279 if (!res || !res->flags || res->start > res->end || res->parent)
1282 || res->start > res->end || res->parent)
1283 continue; 1280 continue;
1284 if (bus->parent == NULL) 1281 if (bus->parent == NULL)
1285 pr = (res->flags & IORESOURCE_IO) ? 1282 pr = (res->flags & IORESOURCE_IO) ?