Skip to contentSkip to conversation

ACPI / hotplug / PCI: Fix error code path in acpiphp_enumerate_slots()

PATCH New Rafael J. Wysocki 1 participant 1 message Oct 10, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ACPI / hotplug / PCI: Fix error code path in acpiphp_enumerate_slots()

From: Rafael J. Wysocki <[email protected]>

One of the error code paths in acpiphp_enumerate_slots() is missing a pci_dev_put(bridge->pci_dev) call, so add it.

---

This is new in 3.12-rc.

---
 drivers/pci/hotplug/acpiphp_glue.c |    1 +
 1 file changed, 1 insertion(+)
drivers/pci/hotplug/acpiphp_glue.c +1 -0
Index: linux-pm/drivers/pci/hotplug/acpiphp_glue.c
===================================================================
@@ -1007,6 +1007,7 @@ void acpiphp_enumerate_slots(struct pci_
 		if (WARN_ON(!context)) {
 			mutex_unlock(&acpiphp_context_lock);
 			put_device(&bus->dev);
+			pci_dev_put(bridge->pci_dev);
 			kfree(bridge);
 			return;
 		}