ASoC: Return proper error for omap3pandora_soc_init
PATCH 1/2 ASoC: Return proper error for omap3pandora_soc_init
Return PTR_ERR(omap3pandora_dac_reg) instead of 0 if regulator_get failed.
--- sound/soc/omap/omap3pandora.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
sound/soc/omap/omap3pandora.c +1 -0
@@ -307,6 +307,7 @@ static int __init omap3pandora_soc_init(void)pr_err (PREFIX "Failed to get DAC regulator from %s: %ld\n" ,dev_name (&omap3pandora_snd_device->dev),PTR_ERR (omap3pandora_dac_reg)); + ret =PTR_ERR (omap3pandora_dac_reg); goto fail3; }
Signature · 1 line
1.7.2
PATCH 2/2 ASoC: Fix resource reclaim for osk5912
--- sound/soc/omap/osk5912.c | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-)
sound/soc/omap/osk5912.c +8 -3
@@ -177,7 +177,8 @@ static int __init osk_soc_init(void) tlv320aic23_mclk =clk_get (dev,"mclk" );if (IS_ERR (tlv320aic23_mclk)) {printk (KERN_ERR "Could not get mclk clock\n" ); -return -ENODEV ; + err =PTR_ERR (tlv320aic23_mclk); + goto err2; }/*
@@ -188,7 +189,7 @@ static int __init osk_soc_init(void)if (clk_set_rate (tlv320aic23_mclk,CODEC_CLOCK )) {printk (KERN_ERR "Cannot set MCLK for AIC23 CODEC\n" ); err = -ECANCELED ; - goto err1; + goto err3; } }
@@ -196,9 +197,12 @@ static int __init osk_soc_init(void) (uint) clk_get_rate(tlv320aic23_mclk), CODEC_CLOCK);return 0 ; -err1: + +err3:clk_put (tlv320aic23_mclk); +err2:platform_device_del (osk_snd_device); +err1:platform_device_put (osk_snd_device);return err;
@@ -207,6 +211,7 @@ err1: static void __exit osk_soc_exit(void) { +clk_put (tlv320aic23_mclk);platform_device_unregister (osk_snd_device); }
Signature · 1 line
1.7.2
Re: [PATCH 2/2] ASoC: Fix resource reclaim for osk5912
Quoted 5 lines · On Wed, 24 Nov 2010 15:23:20 +0800 Axel Lin <[email protected]> wrote:
Signed-off-by Axel Lin <[email protected]>--- sound/soc/omap/osk5912.c | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-)
Good catches,
Re: [PATCH 2/2] ASoC: Fix resource reclaim for osk5912
In reply to Axel LinOn Wed, Nov 24, 2010 at 12:53, Axel Lin <[email protected]> wrote:
Add Patch description.
sound/soc/omap/osk5912.c
Quoted 9 lines
Signed-off-by Axel Lin <[email protected]>---
sound/soc/omap/osk5912.c | 11 ++++++++---1 files changed, 8 insertions(+), 3 deletions(-)sound/soc/omap/osk5912.c +0
-0
<<snip>>
Re: [PATCH 2/2] ASoC: Fix resource reclaim for osk5912
Quoted 6 lines · Charulatha
On Wed, Nov 24, 2010 at 12:53, Axel Lin <[email protected]> wrote:
Add Patch description.
Quoted 2 lines
Signed-off-by Axel Lin <[email protected]>---
Please resubmit with a patch description and Jarkko's Ack.
Thanks
Liam
Signature · 3 lines
Freelance Developer, SlimLogic Ltd ASoC and Voltage Regulator Maintainer. http://www.slimlogic.co.uk
Quoted 12 lines · On Wed, 24 Nov 2010 15:20:48 +0800 Axel Lin <[email protected]> wrote:
Return
PTR_ERR(omap3pandora_dac_reg)instead of 0 ifregulator_getfailed.Signed-off-by Axel Lin <[email protected]>--- sound/soc/omap/omap3pandora.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)sound/soc/omap/omap3pandora.c +0
-0
sound/soc/omap/omap3pandora.c static int __init omap3pandora_soc_init(void) · line 312
Quoted 6 lines
sound/soc/omap/omap3pandora.c +1
-0@@ -307,6 +307,7 @@ static int __init omap3pandora_soc_init(void)pr_err (PREFIX "Failed to get DAC regulator from %s: %ld\n" ,dev_name (&omap3pandora_snd_device->dev),PTR_ERR (omap3pandora_dac_reg)); + ret =PTR_ERR (omap3pandora_dac_reg); goto fail3; }
Quoted 12 lines · Axel Lin
Return
PTR_ERR(omap3pandora_dac_reg)instead of 0 ifregulator_getfailed.Signed-off-by Axel Lin <[email protected]>--- sound/soc/omap/omap3pandora.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)sound/soc/omap/omap3pandora.c +0
-0
sound/soc/omap/omap3pandora.c static int __init omap3pandora_soc_init(void) · line 313
Quoted 7 lines
sound/soc/omap/omap3pandora.c +1
-0@@ -307,6 +307,7 @@ static int __init omap3pandora_soc_init(void)pr_err (PREFIX "Failed to get DAC regulator from %s: %ld\n" ,dev_name (&omap3pandora_snd_device->dev),PTR_ERR (omap3pandora_dac_reg)); + ret =PTR_ERR (omap3pandora_dac_reg); goto fail3; }
Signature · 3 lines
Freelance Developer, SlimLogic Ltd ASoC and Voltage Regulator Maintainer. http://www.slimlogic.co.uk
Mark Brown
AppliedQuoted 3 lines · Axel Lin
Return
PTR_ERR(omap3pandora_dac_reg)instead of 0 ifregulator_getfailed.Signed-off-by Axel Lin <[email protected]>
Applied, thanks.