提交 9bef6489 编写于 作者: S Stephen Ware 提交者: Mark Brown

ASoC: Fix pxa2xx-pcm checks for invalid DMA channels

Set the invalid dma channel to -1 (and check properly for it) in
pxa2xx_pcm_hw_free().  Was assuming 0 is an invalid channel number but 0
is a valid pxa dma channel num.
Signed-off-by: Nstephen <stephen.ware@eqware.net>
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 276c6222
......@@ -61,9 +61,9 @@ static int pxa2xx_pcm_hw_free(struct snd_pcm_substream *substream)
__pxa2xx_pcm_hw_free(substream);
if (prtd->dma_ch) {
if (prtd->dma_ch >= 0) {
pxa_free_dma(prtd->dma_ch);
prtd->dma_ch = 0;
prtd->dma_ch = -1;
}
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册