alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Liam Girdwood <lrg@ti.com>
To: Axel Lin <axel.lin@gmail.com>
Cc: alsa-devel@alsa-project.org, Mark@alsa-project.org,
	Brown <broonie@opensource.wolfsonmicro.com>,
	linux-kernel@vger.kernel.org, Timur Tabi <timur@freescale.com>
Subject: Re: [PATCH] ASoC: fsl: Fix error handling if platform_device_add fails
Date: Tue, 20 Sep 2011 12:21:01 +0100	[thread overview]
Message-ID: <1316517661.8314.4.camel@odin> (raw)
In-Reply-To: <1316502540.4269.1.camel@phoenix>

On Tue, 2011-09-20 at 15:09 +0800, Axel Lin wrote:
> Call platform_device_put() instead of platform_device_unregister() if
> platform_device_add() fails.
> 
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
> ---
>  sound/soc/fsl/mpc8610_hpcd.c |    2 +-
>  sound/soc/fsl/p1022_ds.c     |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/sound/soc/fsl/mpc8610_hpcd.c b/sound/soc/fsl/mpc8610_hpcd.c
> index 358f0ba..31af405 100644
> --- a/sound/soc/fsl/mpc8610_hpcd.c
> +++ b/sound/soc/fsl/mpc8610_hpcd.c
> @@ -505,7 +505,7 @@ static int mpc8610_hpcd_probe(struct platform_device *pdev)
>  	return 0;
>  
>  error_sound:
> -	platform_device_unregister(sound_device);
> +	platform_device_put(sound_device);
>  error:
>  	kfree(machine_data);
>  error_alloc:
> diff --git a/sound/soc/fsl/p1022_ds.c b/sound/soc/fsl/p1022_ds.c
> index e8849ed..2c064a9 100644
> --- a/sound/soc/fsl/p1022_ds.c
> +++ b/sound/soc/fsl/p1022_ds.c
> @@ -506,7 +506,7 @@ static int p1022_ds_probe(struct platform_device *pdev)
>  
>  error:
>  	if (sound_device)
> -		platform_device_unregister(sound_device);
> +		platform_device_put(sound_device);
>  
>  	kfree(mdata);
>  error_put:

Acked-by: Liam Girdwood <lrg@ti.com>

  reply	other threads:[~2011-09-20 11:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-20  7:09 [PATCH] ASoC: fsl: Fix error handling if platform_device_add fails Axel Lin
2011-09-20 11:21 ` Liam Girdwood [this message]
2011-09-20 12:04 ` Mark Brown
2011-09-20 16:00 ` Timur Tabi
2011-09-21  2:23 ` Questions for dummy codec driver Leo Yan
2011-09-21 12:56   ` Mark Brown
2011-09-22  1:42     ` Leo Yan
2011-09-26 21:47       ` Mark Brown
2011-09-27  2:08 ` [PATCH] ASoC: fsl: Fix error handling if platform_device_add fails Tabi Timur-B04825
2011-09-27  2:21   ` Axel Lin

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=1316517661.8314.4.camel@odin \
    --to=lrg@ti.com \
    --cc=Mark@alsa-project.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=axel.lin@gmail.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=timur@freescale.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;
as well as URLs for NNTP newsgroup(s).