summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorInsu Yun <wuninsu@gmail.com>2016-01-23 23:44:19 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-03-04 02:07:24 +0300
commit5066e4475fe82ba77afd521bf373c7ee8faac0c8 (patch)
tree8dae2e848da7bb30eb65e718ea3a5e38a77d3e03
parenteac1122b727753dd6ea32a852d926f228ace6f66 (diff)
downloadlinux-5066e4475fe82ba77afd521bf373c7ee8faac0c8.tar.xz
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 ff538568a617..0b3e0bfa7be5 100644
--- a/drivers/pci/hotplug/acpiphp_glue.c
+++ b/drivers/pci/hotplug/acpiphp_glue.c
@@ -953,8 +953,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))