public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Samuel Ortiz <sameo@linux.intel.com>
To: Axel Lin <axel.lin@gmail.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Ian Molton <spyro@f2s.com>,
	Dmitry Baryshkov <dbaryshkov@gmail.com>
Subject: Re: [PATCH] mfd-core: properly handle platform_device_add_resources fail in mfd_add_device
Date: Fri, 18 Jun 2010 23:32:51 +0200	[thread overview]
Message-ID: <20100618213250.GG3582@sortiz.org> (raw)
In-Reply-To: <1275298255.23779.2.camel@mola>

On Mon, May 31, 2010 at 05:30:55PM +0800, Axel Lin wrote:
> platform_device_add_resources may fail, thus add error checking for it.
Thanks Axel, patch applied.

Cheers,
Samuel.

 
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
> ---
>  drivers/mfd/mfd-core.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c
> index 7dd76bc..1823a57 100644
> --- a/drivers/mfd/mfd-core.c
> +++ b/drivers/mfd/mfd-core.c
> @@ -70,7 +70,9 @@ static int mfd_add_device(struct device *parent, int id,
>  			goto fail_res;
>  	}
>  
> -	platform_device_add_resources(pdev, res, cell->num_resources);
> +	ret = platform_device_add_resources(pdev, res, cell->num_resources);
> +	if (ret)
> +		goto fail_res;
>  
>  	ret = platform_device_add(pdev);
>  	if (ret)
> -- 
> 1.5.4.3
> 
> 
> 

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

      reply	other threads:[~2010-06-18 21:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-31  9:30 [PATCH] mfd-core: properly handle platform_device_add_resources fail in mfd_add_device Axel Lin
2010-06-18 21:32 ` Samuel Ortiz [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=20100618213250.GG3582@sortiz.org \
    --to=sameo@linux.intel.com \
    --cc=axel.lin@gmail.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=dbaryshkov@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=spyro@f2s.com \
    /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