]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ACPI / PCI / hotplug: unlock in error path in acpiphp_enable_slot()
authorInsu Yun <wuninsu@gmail.com>
Sat, 23 Jan 2016 20:44:19 +0000 (15:44 -0500)
committerLuis Henriques <luis.henriques@canonical.com>
Tue, 16 Feb 2016 19:50:02 +0000 (19:50 +0000)
commit 2c3033a0664dfae91e1dee7fabac10f24354b958 upstream.

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>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
drivers/pci/hotplug/acpiphp_glue.c

index c074b262a4923f1191afa4dba131e8c20ed1a2ff..0e7399056e23eaa6bf5530627172e246407885f9 100644 (file)
@@ -970,8 +970,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))