ALSA: snd-atmel-abdac: test wrong variable
Subsystems (3)
PATCH 1/1 ALSA: snd-atmel-abdac: test wrong variable
After clk_get() pclk is checked second time instead of sample_clk check.
---
Compile tested only.
sound/atmel/abdac.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
sound/atmel/abdac.c +1 -1
@@ -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;
Signature · 1 line
1.7.0.4
At Sun, 21 Nov 2010 20:40:07 +0300,
Quoted 4 lines · Vasiliy Kulikov
After
clk_get()pclk is checked second time instead ofsample_clkcheck.Signed-off-by Vasiliy Kulikov <[email protected]>
Applied now. Thanks.
Takashi
Quoted 22 lines
---
Compile tested only.sound/atmel/abdac.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)sound/atmel/abdac.c +1
-1@@ -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;Signature · 1 line
1.7.0.4
At Mon, 22 Nov 2010 07:56:41 +0100,
Quoted 9 lines · Takashi Iwai
At Sun, 21 Nov 2010 20:40:07 +0300,
Quoted 4 lines · Vasiliy Kulikov
After
clk_get()pclk is checked second time instead ofsample_clkcheck.Signed-off-by Vasiliy Kulikov <[email protected]>Applied now. Thanks.
Ah, I found out that PTR_ERR() should be fixed as well. An additional patch applied as below.
thanks,
Takashi
===
Quoted 1 line
From
e61aabdb7608fd63d9705ab8bbf16f5145acead2Mon Sep 17 00:00:00 2001
From: Takashi Iwai <[email protected]>
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.
--- sound/atmel/abdac.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
sound/atmel/abdac.c +1 -1
@@ -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);
Signature · 1 line
1.7.3.1