ACPI / hotplug / PCI: Fix error code path in acpiphp_enumerate_slots()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 11 Oct 2013 11:20:50 +0000 (13:20 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 11 Oct 2013 23:47:43 +0000 (01:47 +0200)
One of the error code paths in acpiphp_enumerate_slots() is missing
a pci_dev_put(bridge->pci_dev) call, so add it.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/hotplug/acpiphp_glue.c

index 0b7d23b..5042b57 100644 (file)
@@ -1002,6 +1002,7 @@ void acpiphp_enumerate_slots(struct pci_bus *bus)
                if (WARN_ON(!context)) {
                        mutex_unlock(&acpiphp_context_lock);
                        put_device(&bus->dev);
+                       pci_dev_put(bridge->pci_dev);
                        kfree(bridge);
                        return;
                }