Skip to content

Commit

Permalink
ASoC: pxa-pcm-lib: initialize DMA channel to -1
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Daniel Mack authored and Mark Brown committed Mar 19, 2010
1 parent 6937c94 commit 8727b90
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sound/arm/pxa2xx-pcm-lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 8727b90

Please sign in to comment.