|
@@ -764,6 +764,8 @@ int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max,
|
|
|
if (pci_find_bus(pci_domain_nr(bus), max+1))
|
|
|
goto out;
|
|
|
child = pci_add_new_bus(bus, dev, ++max);
|
|
|
+ if (!child)
|
|
|
+ goto out;
|
|
|
buses = (buses & 0xff000000)
|
|
|
| ((unsigned int)(child->primary) << 0)
|
|
|
| ((unsigned int)(child->secondary) << 8)
|
|
@@ -777,7 +779,7 @@ int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max,
|
|
|
buses &= ~0xff000000;
|
|
|
buses |= CARDBUS_LATENCY_TIMER << 24;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/*
|
|
|
* We need to blast all three values with a single write.
|
|
|
*/
|