ALSA: snd-atmel-abdac: test wrong variable
[linux-3.10.git] / sound / atmel / abdac.c
index 32064fafbc2e548d267c615f47cdd31037850a5a..4e47baada66ffd0e5e9fe9919809ebdf25d147dd 100644 (file)
@@ -165,7 +165,7 @@ static struct snd_pcm_hardware atmel_abdac_hw = {
        .buffer_bytes_max       = 64 * 4096,
        .period_bytes_min       = 4096,
        .period_bytes_max       = 4096,
-       .periods_min            = 4,
+       .periods_min            = 6,
        .periods_max            = 64,
 };
 
@@ -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;