Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
[deliverable/linux.git] / drivers / pci / probe.c
index c84900da3c59249e44466d7b1e601e4f399f3293..44cbbbaa499da6fc4ad886febdb5598af4993011 100644 (file)
@@ -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.
                 */
This page took 0.025805 seconds and 5 git commands to generate.