mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Insu Yun <wuninsu@gmail.com>
Cc: lenb@kernel.org, bhelgaas@google.com, linux-acpi@vger.kernel.org,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	taesoo@gatech.edu, yeongjin.jang@gatech.edu, insu@gatech.edu,
	changwoo@gatech.edu
Subject: Re: [PATCH] hotplug: unlock in error path in acpiphp_enable_slot
Date: Sun, 24 Jan 2016 02:17:24 +0100	[thread overview]
Message-ID: <1559503.GJNuT7qv7A@vostro.rjw.lan> (raw)
In-Reply-To: <1453581859-19565-1-git-send-email-wuninsu@gmail.com>

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.

      reply	other threads:[~2016-01-24  1:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-23 20:44 Insu Yun
2016-01-24  1:17 ` Rafael J. Wysocki [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1559503.GJNuT7qv7A@vostro.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=bhelgaas@google.com \
    --cc=changwoo@gatech.edu \
    --cc=insu@gatech.edu \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=taesoo@gatech.edu \
    --cc=wuninsu@gmail.com \
    --cc=yeongjin.jang@gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®