linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hotplug: unlock in error path in acpiphp_enable_slot
@ 2016-01-23 20:44 Insu Yun
  2016-01-24  1:17 ` Rafael J. Wysocki
  0 siblings, 1 reply; 2+ messages in thread
From: Insu Yun @ 2016-01-23 20:44 UTC (permalink / raw)
  To: rjw, lenb, bhelgaas, linux-acpi, linux-pci, linux-kernel
  Cc: taesoo, yeongjin.jang, insu, changwoo, 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 <wuninsu@gmail.com>
---
 drivers/pci/hotplug/acpiphp_glue.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c
index ff53856..0b3e0bf 100644
--- a/drivers/pci/hotplug/acpiphp_glue.c
+++ b/drivers/pci/hotplug/acpiphp_glue.c
@@ -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))
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] hotplug: unlock in error path in acpiphp_enable_slot
  2016-01-23 20:44 [PATCH] hotplug: unlock in error path in acpiphp_enable_slot Insu Yun
@ 2016-01-24  1:17 ` Rafael J. Wysocki
  0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2016-01-24  1:17 UTC (permalink / raw)
  To: Insu Yun
  Cc: lenb, bhelgaas, linux-acpi, linux-pci, linux-kernel, taesoo,
	yeongjin.jang, insu, changwoo

On Saturday, January 23, 2016 03:44:19 PM Insu Yun wrote:
> 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>

Applied, thanks!

> ---
>  drivers/pci/hotplug/acpiphp_glue.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c
> index ff53856..0b3e0bf 100644
> --- a/drivers/pci/hotplug/acpiphp_glue.c
> +++ b/drivers/pci/hotplug/acpiphp_glue.c
> @@ -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))
> 

-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-01-24  1:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-23 20:44 [PATCH] hotplug: unlock in error path in acpiphp_enable_slot Insu Yun
2016-01-24  1:17 ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).