summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorInsu Yun <wuninsu@gmail.com>2016-01-23 15:44:19 -0500
committerSasha Levin <sasha.levin@oracle.com>2016-02-15 15:45:27 -0500
commit9f4bab04f3788cd66b203c501fe30d093fe4d8d7 (patch)
tree5ed37ced35551368fa13bbd5df24c2339b978f98
parent4470ba0e8a7f353cf3868eca475272d49605f823 (diff)
ACPI / PCI / hotplug: unlock in error path in acpiphp_enable_slot()
[ Upstream commit 2c3033a0664dfae91e1dee7fabac10f24354b958 ] 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> Cc: All applicable <stable@vger.kernel.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
-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 bcb90e4888dd..b60309ee80ed 100644
--- a/drivers/pci/hotplug/acpiphp_glue.c
+++ b/drivers/pci/hotplug/acpiphp_glue.c
@@ -954,8 +954,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;
+ }
/* configure all functions */
if (!(slot->flags & SLOT_ENABLED))