sound jz4740_pcm: Set dma channel to NULL after it has been freed, because hw_free can be called multiple times aswell.
SVN-Revision: 20373
This commit is contained in:
parent
fd3344d488
commit
0ddd7f1082
1 changed files with 3 additions and 1 deletions
|
@ -136,8 +136,10 @@ static int jz4740_pcm_hw_free(struct snd_pcm_substream *substream)
|
||||||
struct jz4740_runtime_data *prtd = substream->runtime->private_data;
|
struct jz4740_runtime_data *prtd = substream->runtime->private_data;
|
||||||
|
|
||||||
snd_pcm_set_runtime_buffer(substream, NULL);
|
snd_pcm_set_runtime_buffer(substream, NULL);
|
||||||
if (prtd->dma)
|
if (prtd->dma) {
|
||||||
jz4740_dma_free(prtd->dma);
|
jz4740_dma_free(prtd->dma);
|
||||||
|
prtd->dma = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue