Commit 5baad2a3 authored by Insu Yun's avatar Insu Yun Committed by Sasha Levin

ACPI / PCI / hotplug: unlock in error path in acpiphp_enable_slot()

[ Upstream commit 2c3033a0 ]

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: default avatarInsu Yun <wuninsu@gmail.com>
Cc: All applicable <stable@vger.kernel.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
parent 31eef676
......@@ -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))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment