linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Nathan Fontenot <nfont@linux.vnet.ibm.com>
To: Bharata B Rao <bharata.rao@gmail.com>, linuxppc-dev@lists.ozlabs.org
Cc: Bharata B Rao <bharata@linux.vnet.ibm.com>
Subject: Re: [PATCH FIX] powerpc/pseries: Release DRC when configure_connector fails
Date: Fri, 04 Sep 2015 09:42:45 -0500	[thread overview]
Message-ID: <55E9ADE5.1080605@linux.vnet.ibm.com> (raw)
In-Reply-To: <1441361052-3319-1-git-send-email-bharata.rao@gmail.com>

On 09/04/2015 05:04 AM, Bharata B Rao wrote:
> From: Bharata B Rao <bharata@linux.vnet.ibm.com>
> 
> dlpar_cpu_probe() should release the acquired DRC if configure_connector
> call fails.
> 
> Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
> Cc: Nathan Fontenot <nfont@linux.vnet.ibm.com>

Reviewed-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>

> ---
>  arch/powerpc/platforms/pseries/dlpar.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/platforms/pseries/dlpar.c b/arch/powerpc/platforms/pseries/dlpar.c
> index 47d9cebe..db17827 100644
> --- a/arch/powerpc/platforms/pseries/dlpar.c
> +++ b/arch/powerpc/platforms/pseries/dlpar.c
> @@ -422,8 +422,10 @@ static ssize_t dlpar_cpu_probe(const char *buf, size_t count)
> 
>  	dn = dlpar_configure_connector(cpu_to_be32(drc_index), parent);
>  	of_node_put(parent);
> -	if (!dn)
> +	if (!dn) {
> +		dlpar_release_drc(drc_index);
>  		return -EINVAL;
> +	}
> 
>  	rc = dlpar_attach_node(dn);
>  	if (rc) {
> 

  reply	other threads:[~2015-09-04 14:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-04 10:04 [PATCH FIX] powerpc/pseries: Release DRC when configure_connector fails Bharata B Rao
2015-09-04 14:42 ` Nathan Fontenot [this message]
2015-09-07  9:22 ` [FIX] " Michael Ellerman
2015-09-07 10:24   ` Bharata B Rao

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=55E9ADE5.1080605@linux.vnet.ibm.com \
    --to=nfont@linux.vnet.ibm.com \
    --cc=bharata.rao@gmail.com \
    --cc=bharata@linux.vnet.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    /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;
as well as URLs for NNTP newsgroup(s).