hotplug: unlock in error path in acpiphp_enable_slot
PATCH 1/1 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 <[email protected]>
--- drivers/pci/hotplug/acpiphp_glue.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/pci/hotplug/acpiphp_glue.c +3 -1
@@ -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 ))
Signature · 1 line
1.9.1
Rafael J. Wysocki
AppliedQuoted 4 lines · Insu Yun
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 <[email protected]>
Applied, thanks!
Quoted 21 lines
--- drivers/pci/hotplug/acpiphp_glue.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/pci/hotplug/acpiphp_glue.c +3
-1@@ -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 ))
Signature · 2 lines
I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.