Skip to content

Commit

Permalink
ACPI / PCI / hotplug: unlock in error path in acpiphp_enable_slot()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Insu Yun authored and Rafael J. Wysocki committed Jan 24, 2016
1 parent afd2ff9 commit 2c3033a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/pci/hotplug/acpiphp_glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 2c3033a

Please sign in to comment.