diff options
author | Insu Yun <wuninsu@gmail.com> | 2016-01-23 15:44:19 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-01-23 20:09:03 -0500 |
commit | 2c3033a0664dfae91e1dee7fabac10f24354b958 (patch) | |
tree | 35273c034244785dd23bf9c7885979cd093f82e4 | |
parent | afd2ff9b7e1b367172f18ba7f693dfb62bdcb2dc (diff) |
ACPI / PCI / hotplug: unlock in error path in acpiphp_enable_slot()
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>
-rw-r--r-- | drivers/pci/hotplug/acpiphp_glue.c | 4 |
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) | |||
953 | { | 953 | { |
954 | pci_lock_rescan_remove(); | 954 | pci_lock_rescan_remove(); |
955 | 955 | ||
956 | if (slot->flags & SLOT_IS_GOING_AWAY) | 956 | if (slot->flags & SLOT_IS_GOING_AWAY) { |
957 | pci_unlock_rescan_remove(); | ||
957 | return -ENODEV; | 958 | return -ENODEV; |
959 | } | ||
958 | 960 | ||
959 | /* configure all functions */ | 961 | /* configure all functions */ |
960 | if (!(slot->flags & SLOT_ENABLED)) | 962 | if (!(slot->flags & SLOT_ENABLED)) |