Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Insu Yun and committed by
Rafael J. Wysocki
2c3033a0 afd2ff9b

+3 -1
+3 -1
drivers/pci/hotplug/acpiphp_glue.c
··· 953 953 { 954 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 958 return -ENODEV; 959 + } 958 960 959 961 /* configure all functions */ 960 962 if (!(slot->flags & SLOT_ENABLED))