Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2c3033a0 authored by Insu Yun's avatar Insu Yun Committed by Rafael J. Wysocki
Browse files

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: 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>
parent afd2ff9b
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -953,8 +953,10 @@ int acpiphp_enable_slot(struct acpiphp_slot *slot)
{
{
	pci_lock_rescan_remove();
	pci_lock_rescan_remove();


	if (slot->flags & SLOT_IS_GOING_AWAY)
	if (slot->flags & SLOT_IS_GOING_AWAY) {
		pci_unlock_rescan_remove();
		return -ENODEV;
		return -ENODEV;
	}


	/* configure all functions */
	/* configure all functions */
	if (!(slot->flags & SLOT_ENABLED))
	if (!(slot->flags & SLOT_ENABLED))