PCI: Release OF node in pci_scan_device()'s error path
[linux-2.6-microblaze.git] / drivers / pci / probe.c
index 953f15a..be51670 100644 (file)
@@ -2353,6 +2353,7 @@ static struct pci_dev *pci_scan_device(struct pci_bus *bus, int devfn)
        pci_set_of_node(dev);
 
        if (pci_setup_device(dev)) {
+               pci_release_of_node(dev);
                pci_bus_put(dev->bus);
                kfree(dev);
                return NULL;