* [PATCH] ALSA: snd-atmel-abdac: test wrong variable
@ 2010-11-21 17:40 Vasiliy Kulikov
2010-11-22 6:56 ` Takashi Iwai
0 siblings, 1 reply; 3+ messages in thread
From: Vasiliy Kulikov @ 2010-11-21 17:40 UTC (permalink / raw)
To: kernel-janitors; +Cc: Jaroslav Kysela, Takashi Iwai, alsa-devel, linux-kernel
After clk_get() pclk is checked second time instead of sample_clk check.
Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
---
Compile tested only.
sound/atmel/abdac.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sound/atmel/abdac.c b/sound/atmel/abdac.c
index f2f41c8..4e47baa 100644
--- a/sound/atmel/abdac.c
+++ b/sound/atmel/abdac.c
@@ -420,7 +420,7 @@ static int __devinit atmel_abdac_probe(struct platform_device *pdev)
return PTR_ERR(pclk);
}
sample_clk = clk_get(&pdev->dev, "sample_clk");
- if (IS_ERR(pclk)) {
+ if (IS_ERR(sample_clk)) {
dev_dbg(&pdev->dev, "no sample clock\n");
retval = PTR_ERR(pclk);
goto out_put_pclk;
--
1.7.0.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ALSA: snd-atmel-abdac: test wrong variable
2010-11-21 17:40 [PATCH] ALSA: snd-atmel-abdac: test wrong variable Vasiliy Kulikov
@ 2010-11-22 6:56 ` Takashi Iwai
2010-11-22 8:01 ` Takashi Iwai
0 siblings, 1 reply; 3+ messages in thread
From: Takashi Iwai @ 2010-11-22 6:56 UTC (permalink / raw)
To: Vasiliy Kulikov; +Cc: alsa-devel, kernel-janitors, linux-kernel
At Sun, 21 Nov 2010 20:40:07 +0300,
Vasiliy Kulikov wrote:
>
> After clk_get() pclk is checked second time instead of sample_clk check.
>
> Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Applied now. Thanks.
Takashi
> ---
> Compile tested only.
>
> sound/atmel/abdac.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/sound/atmel/abdac.c b/sound/atmel/abdac.c
> index f2f41c8..4e47baa 100644
> --- a/sound/atmel/abdac.c
> +++ b/sound/atmel/abdac.c
> @@ -420,7 +420,7 @@ static int __devinit atmel_abdac_probe(struct platform_device *pdev)
> return PTR_ERR(pclk);
> }
> sample_clk = clk_get(&pdev->dev, "sample_clk");
> - if (IS_ERR(pclk)) {
> + if (IS_ERR(sample_clk)) {
> dev_dbg(&pdev->dev, "no sample clock\n");
> retval = PTR_ERR(pclk);
> goto out_put_pclk;
> --
> 1.7.0.4
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ALSA: snd-atmel-abdac: test wrong variable
2010-11-22 6:56 ` Takashi Iwai
@ 2010-11-22 8:01 ` Takashi Iwai
0 siblings, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2010-11-22 8:01 UTC (permalink / raw)
To: Takashi Iwai; +Cc: linux-kernel, alsa-devel, kernel-janitors, Vasiliy Kulikov
At Mon, 22 Nov 2010 07:56:41 +0100,
Takashi Iwai wrote:
>
> At Sun, 21 Nov 2010 20:40:07 +0300,
> Vasiliy Kulikov wrote:
> >
> > After clk_get() pclk is checked second time instead of sample_clk check.
> >
> > Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
>
> Applied now. Thanks.
Ah, I found out that PTR_ERR() should be fixed as well.
An additional patch applied as below.
thanks,
Takashi
===
>From e61aabdb7608fd63d9705ab8bbf16f5145acead2 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Mon, 22 Nov 2010 08:58:13 +0100
Subject: [PATCH] ALSA: atmel - Fix the return value in error path
In the commit 5ad57d20c91bdaf743bd8e3015df5a388314df8d
ALSA: snd-atmel-abdac: test wrong variable
the return value via PTR_ERR() had to be fixed as well.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
sound/atmel/abdac.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sound/atmel/abdac.c b/sound/atmel/abdac.c
index 4e47baad..6e24091 100644
--- a/sound/atmel/abdac.c
+++ b/sound/atmel/abdac.c
@@ -422,7 +422,7 @@ static int __devinit atmel_abdac_probe(struct platform_device *pdev)
sample_clk = clk_get(&pdev->dev, "sample_clk");
if (IS_ERR(sample_clk)) {
dev_dbg(&pdev->dev, "no sample clock\n");
- retval = PTR_ERR(pclk);
+ retval = PTR_ERR(sample_clk);
goto out_put_pclk;
}
clk_enable(pclk);
--
1.7.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-11-22 8:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-21 17:40 [PATCH] ALSA: snd-atmel-abdac: test wrong variable Vasiliy Kulikov
2010-11-22 6:56 ` Takashi Iwai
2010-11-22 8:01 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox