Commit 8727b909 authored by Daniel Mack's avatar Daniel Mack Committed by Mark Brown

ASoC: pxa-pcm-lib: initialize DMA channel to -1

This fixes a warning ("pxa_free_dma: trying to free channel 0 which is
already freed") when a device was opened but the hw_params() call
failed.
Signed-off-by: default avatarDaniel Mack <daniel@caiaq.de>
Acked-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 6937c947
...@@ -205,6 +205,7 @@ int __pxa2xx_pcm_open(struct snd_pcm_substream *substream) ...@@ -205,6 +205,7 @@ int __pxa2xx_pcm_open(struct snd_pcm_substream *substream)
if (!rtd->dma_desc_array) if (!rtd->dma_desc_array)
goto err1; goto err1;
rtd->dma_ch = -1;
runtime->private_data = rtd; runtime->private_data = rtd;
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment