From: Daniel Mack Date: Sun, 28 Feb 2010 02:42:38 +0000 (+0800) Subject: ASoC: pxa-pcm-lib: initialize DMA channel to -1 X-Git-Tag: MMI-PSA29.97-13-9~24012^2~7^2~17 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8727b909bb2348d29e62c599cd7a5d610da3760f;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 Acked-by: Liam Girdwood Signed-off-by: Mark Brown --- diff --git a/sound/arm/pxa2xx-pcm-lib.c b/sound/arm/pxa2xx-pcm-lib.c index 743ac6a29065..fd51fa8b06a1 100644 --- a/sound/arm/pxa2xx-pcm-lib.c +++ b/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;