All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: playpaq_wm8510: Return proper error if clk_get fails
@ 2011-09-09  2:15 Axel Lin
  2011-09-09 16:38 ` Girdwood, Liam
  2011-09-09 16:43   ` Mark Brown
  0 siblings, 2 replies; 6+ messages in thread
From: Axel Lin @ 2011-09-09  2:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: Geoffrey Wossum, Liam Girdwood, Mark Brown, alsa-devel

Return proper error instead of 0 if clk_get fails.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 sound/soc/atmel/playpaq_wm8510.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/sound/soc/atmel/playpaq_wm8510.c b/sound/soc/atmel/playpaq_wm8510.c
index 1aac2f4..2909bfa 100644
--- a/sound/soc/atmel/playpaq_wm8510.c
+++ b/sound/soc/atmel/playpaq_wm8510.c
@@ -383,14 +383,17 @@ static int __init playpaq_asoc_init(void)
 	_gclk0 = clk_get(NULL, "gclk0");
 	if (IS_ERR(_gclk0)) {
 		_gclk0 = NULL;
+		ret = PTR_ERR(_gclk0);
 		goto err_gclk0;
 	}
 	_pll0 = clk_get(NULL, "pll0");
 	if (IS_ERR(_pll0)) {
 		_pll0 = NULL;
+		ret = PTR_ERR(_pll0);
 		goto err_pll0;
 	}
-	if (clk_set_parent(_gclk0, _pll0)) {
+	ret = clk_set_parent(_gclk0, _pll0);
+	if (ret) {
 		pr_warning("snd-soc-playpaq: "
 			   "Failed to set PLL0 as parent for DAC clock\n");
 		goto err_set_clk;
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] ASoC: playpaq_wm8510: Return proper error if clk_get fails
  2011-09-09  2:15 [PATCH] ASoC: playpaq_wm8510: Return proper error if clk_get fails Axel Lin
@ 2011-09-09 16:38 ` Girdwood, Liam
  2011-09-13 16:16     ` Geoffrey Wossum
  2011-09-09 16:43   ` Mark Brown
  1 sibling, 1 reply; 6+ messages in thread
From: Girdwood, Liam @ 2011-09-09 16:38 UTC (permalink / raw)
  To: Axel Lin; +Cc: alsa-devel, Geoffrey Wossum, linux-kernel, Mark Brown

On 9 September 2011 03:15, Axel Lin <axel.lin@gmail.com> wrote:

> Return proper error instead of 0 if clk_get fails.
>
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
> ---
>  sound/soc/atmel/playpaq_wm8510.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/sound/soc/atmel/playpaq_wm8510.c
> b/sound/soc/atmel/playpaq_wm8510.c
> index 1aac2f4..2909bfa 100644
> --- a/sound/soc/atmel/playpaq_wm8510.c
> +++ b/sound/soc/atmel/playpaq_wm8510.c
> @@ -383,14 +383,17 @@ static int __init playpaq_asoc_init(void)
>        _gclk0 = clk_get(NULL, "gclk0");
>        if (IS_ERR(_gclk0)) {
>                _gclk0 = NULL;
> +               ret = PTR_ERR(_gclk0);
>                goto err_gclk0;
>        }
>        _pll0 = clk_get(NULL, "pll0");
>        if (IS_ERR(_pll0)) {
>                _pll0 = NULL;
> +               ret = PTR_ERR(_pll0);
>                goto err_pll0;
>        }
> -       if (clk_set_parent(_gclk0, _pll0)) {
> +       ret = clk_set_parent(_gclk0, _pll0);
> +       if (ret) {
>                pr_warning("snd-soc-playpaq: "
>                           "Failed to set PLL0 as parent for DAC clock\n");
>                goto err_set_clk;
> --
> 1.7.4.1
>
>
>
>
Acked-by: Liam Girdwood <lrg@ti.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ASoC: playpaq_wm8510: Return proper error if clk_get fails
  2011-09-09  2:15 [PATCH] ASoC: playpaq_wm8510: Return proper error if clk_get fails Axel Lin
@ 2011-09-09 16:43   ` Mark Brown
  2011-09-09 16:43   ` Mark Brown
  1 sibling, 0 replies; 6+ messages in thread
From: Mark Brown @ 2011-09-09 16:43 UTC (permalink / raw)
  To: Axel Lin; +Cc: alsa-devel, Geoffrey Wossum, linux-kernel, Liam Girdwood

On Fri, Sep 09, 2011 at 10:15:37AM +0800, Axel Lin wrote:
> Return proper error instead of 0 if clk_get fails.
> 
> Signed-off-by: Axel Lin <axel.lin@gmail.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ASoC: playpaq_wm8510: Return proper error if clk_get fails
@ 2011-09-09 16:43   ` Mark Brown
  0 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2011-09-09 16:43 UTC (permalink / raw)
  To: Axel Lin; +Cc: linux-kernel, Geoffrey Wossum, Liam Girdwood, alsa-devel

On Fri, Sep 09, 2011 at 10:15:37AM +0800, Axel Lin wrote:
> Return proper error instead of 0 if clk_get fails.
> 
> Signed-off-by: Axel Lin <axel.lin@gmail.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ASoC: playpaq_wm8510: Return proper error if clk_get fails
  2011-09-09 16:38 ` Girdwood, Liam
@ 2011-09-13 16:16     ` Geoffrey Wossum
  0 siblings, 0 replies; 6+ messages in thread
From: Geoffrey Wossum @ 2011-09-13 16:16 UTC (permalink / raw)
  To: Girdwood, Liam
  Cc: Axel Lin, Geoffrey Wossum, linux-kernel@vger.kernel.org,
	alsa-devel@alsa-project.org, Mark Brown

On Friday, September 09, 2011 11:38:44 AM Girdwood, Liam wrote:


On 9 September 2011 03:15, Axel Lin 
<axel.lin@gmail.com<mailto:axel.lin@gmail.com>> wrote:
Return proper error instead of 0 if clk_get fails.

Signed-off-by: Axel Lin <axel.lin@gmail.com<mailto:axel.lin@gmail.com>>
---
 sound/soc/atmel/playpaq_wm8510.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/sound/soc/atmel/playpaq_wm8510.c 
b/sound/soc/atmel/playpaq_wm8510.c
index 1aac2f4..2909bfa 100644
--- a/sound/soc/atmel/playpaq_wm8510.c
+++ b/sound/soc/atmel/playpaq_wm8510.c
@@ -383,14 +383,17 @@ static int __init playpaq_asoc_init(void)
       _gclk0 = clk_get(NULL, "gclk0");
       if (IS_ERR(_gclk0)) {
               _gclk0 = NULL;
+               ret = PTR_ERR(_gclk0);
               goto err_gclk0;
       }
       _pll0 = clk_get(NULL, "pll0");
       if (IS_ERR(_pll0)) {
               _pll0 = NULL;
+               ret = PTR_ERR(_pll0);
               goto err_pll0;
       }
-       if (clk_set_parent(_gclk0, _pll0)) {
+       ret = clk_set_parent(_gclk0, _pll0);
+       if (ret) {
               pr_warning("snd-soc-playpaq: "
                          "Failed to set PLL0 as parent for DAC clock\n");
               goto err_set_clk;
--
1.7.4.1




Acked-by: Liam Girdwood <lrg@ti.com<mailto:lrg@ti.com>>
Acked-by: Geoffrey Wossum <gwossum@acm.org>

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] ASoC: playpaq_wm8510: Return proper error if clk_get fails
@ 2011-09-13 16:16     ` Geoffrey Wossum
  0 siblings, 0 replies; 6+ messages in thread
From: Geoffrey Wossum @ 2011-09-13 16:16 UTC (permalink / raw)
  To: Girdwood, Liam
  Cc: Axel Lin, linux-kernel@vger.kernel.org, Geoffrey Wossum,
	Mark Brown, alsa-devel@alsa-project.org

On Friday, September 09, 2011 11:38:44 AM Girdwood, Liam wrote:


On 9 September 2011 03:15, Axel Lin 
<axel.lin@gmail.com<mailto:axel.lin@gmail.com>> wrote:
Return proper error instead of 0 if clk_get fails.

Signed-off-by: Axel Lin <axel.lin@gmail.com<mailto:axel.lin@gmail.com>>
---
 sound/soc/atmel/playpaq_wm8510.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/sound/soc/atmel/playpaq_wm8510.c 
b/sound/soc/atmel/playpaq_wm8510.c
index 1aac2f4..2909bfa 100644
--- a/sound/soc/atmel/playpaq_wm8510.c
+++ b/sound/soc/atmel/playpaq_wm8510.c
@@ -383,14 +383,17 @@ static int __init playpaq_asoc_init(void)
       _gclk0 = clk_get(NULL, "gclk0");
       if (IS_ERR(_gclk0)) {
               _gclk0 = NULL;
+               ret = PTR_ERR(_gclk0);
               goto err_gclk0;
       }
       _pll0 = clk_get(NULL, "pll0");
       if (IS_ERR(_pll0)) {
               _pll0 = NULL;
+               ret = PTR_ERR(_pll0);
               goto err_pll0;
       }
-       if (clk_set_parent(_gclk0, _pll0)) {
+       ret = clk_set_parent(_gclk0, _pll0);
+       if (ret) {
               pr_warning("snd-soc-playpaq: "
                          "Failed to set PLL0 as parent for DAC clock\n");
               goto err_set_clk;
--
1.7.4.1




Acked-by: Liam Girdwood <lrg@ti.com<mailto:lrg@ti.com>>
Acked-by: Geoffrey Wossum <gwossum@acm.org>


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-09-13 16:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-09  2:15 [PATCH] ASoC: playpaq_wm8510: Return proper error if clk_get fails Axel Lin
2011-09-09 16:38 ` Girdwood, Liam
2011-09-13 16:16   ` Geoffrey Wossum
2011-09-13 16:16     ` Geoffrey Wossum
2011-09-09 16:43 ` Mark Brown
2011-09-09 16:43   ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.