ALSA: snd-atmel-abdac: test wrong variable
authorVasiliy Kulikov <segoon@openwall.com>
Sun, 21 Nov 2010 17:40:07 +0000 (20:40 +0300)
committerTakashi Iwai <tiwai@suse.de>
Mon, 22 Nov 2010 06:55:20 +0000 (07:55 +0100)
After clk_get() pclk is checked second time instead of sample_clk check.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/atmel/abdac.c

index f2f41c8542211143cc56e83328092d1bcb27a2bf..4e47baada66ffd0e5e9fe9919809ebdf25d147dd 100644 (file)
@@ -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;