summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorInsu Yun <wuninsu@gmail.com>2016-01-23 15:44:19 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-03-03 15:06:52 -0800
commiteeecc3f39587463b95ea8ddd7b7ec2c2155e0782 (patch)
treea957fb21a16375e5d4aba1a9ca3efeaf711d64f5
parentee61647c34f18c204db1bc384e53c9f11c1b3819 (diff)
downloadlwn-eeecc3f39587463b95ea8ddd7b7ec2c2155e0782.tar.gz
lwn-eeecc3f39587463b95ea8ddd7b7ec2c2155e0782.zip
ACPI / PCI / hotplug: unlock in error path in acpiphp_enable_slot()
commit 2c3033a0664dfae91e1dee7fabac10f24354b958 upstream. In acpiphp_enable_slot(), there is a missing unlock path when error occurred. It needs to be unlocked before returning an error. Signed-off-by: Insu Yun <wuninsu@gmail.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/pci/hotplug/acpiphp_glue.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c
index 7c7a388c85ab..126f641a9582 100644
--- a/drivers/pci/hotplug/acpiphp_glue.c
+++ b/drivers/pci/hotplug/acpiphp_glue.c
@@ -1133,8 +1133,10 @@ int acpiphp_enable_slot(struct acpiphp_slot *slot)
{
pci_lock_rescan_remove();
- if (slot->flags & SLOT_IS_GOING_AWAY)
+ if (slot->flags & SLOT_IS_GOING_AWAY) {
+ pci_unlock_rescan_remove();
return -ENODEV;
+ }
mutex_lock(&slot->crit_sect);
/* configure all functions */