diff options
| -rw-r--r-- | sound/atmel/ac97c.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/sound/atmel/ac97c.c b/sound/atmel/ac97c.c index 3c8d3ba7ddfc..9052aff37f64 100644 --- a/sound/atmel/ac97c.c +++ b/sound/atmel/ac97c.c | |||
| @@ -278,14 +278,9 @@ static int atmel_ac97c_capture_hw_params(struct snd_pcm_substream *substream, | |||
| 278 | if (retval < 0) | 278 | if (retval < 0) |
| 279 | return retval; | 279 | return retval; |
| 280 | /* snd_pcm_lib_malloc_pages returns 1 if buffer is changed. */ | 280 | /* snd_pcm_lib_malloc_pages returns 1 if buffer is changed. */ |
| 281 | if (cpu_is_at32ap7000()) { | 281 | if (cpu_is_at32ap7000() && retval == 1) |
| 282 | if (retval < 0) | 282 | if (test_and_clear_bit(DMA_RX_READY, &chip->flags)) |
| 283 | return retval; | 283 | dw_dma_cyclic_free(chip->dma.rx_chan); |
| 284 | /* snd_pcm_lib_malloc_pages returns 1 if buffer is changed. */ | ||
| 285 | if (retval == 1) | ||
| 286 | if (test_and_clear_bit(DMA_RX_READY, &chip->flags)) | ||
| 287 | dw_dma_cyclic_free(chip->dma.rx_chan); | ||
| 288 | } | ||
| 289 | 284 | ||
| 290 | /* Set restrictions to params. */ | 285 | /* Set restrictions to params. */ |
| 291 | mutex_lock(&opened_mutex); | 286 | mutex_lock(&opened_mutex); |
| @@ -980,6 +975,7 @@ static int __devinit atmel_ac97c_probe(struct platform_device *pdev) | |||
| 980 | 975 | ||
| 981 | if (!chip->regs) { | 976 | if (!chip->regs) { |
| 982 | dev_dbg(&pdev->dev, "could not remap register memory\n"); | 977 | dev_dbg(&pdev->dev, "could not remap register memory\n"); |
| 978 | retval = -ENOMEM; | ||
| 983 | goto err_ioremap; | 979 | goto err_ioremap; |
| 984 | } | 980 | } |
| 985 | 981 | ||
