Browse Source

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: Daniel Mack <daniel@caiaq.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Daniel Mack 15 năm trước cách đây
mục cha
commit
8727b909bb
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      sound/arm/pxa2xx-pcm-lib.c

+ 1 - 0
sound/arm/pxa2xx-pcm-lib.c

@@ -205,6 +205,7 @@ int __pxa2xx_pcm_open(struct snd_pcm_substream *substream)
 	if (!rtd->dma_desc_array)
 		goto err1;
 
+	rtd->dma_ch = -1;
 	runtime->private_data = rtd;
 	return 0;