diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 19658873b4c1..ddf5ba63b195 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -1694,6 +1694,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;