diff options
Diffstat (limited to 'sound/soc/fsl/fsl_asrc_dma.c')
-rw-r--r-- | sound/soc/fsl/fsl_asrc_dma.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sound/soc/fsl/fsl_asrc_dma.c b/sound/soc/fsl/fsl_asrc_dma.c index 5b1e73e9781..ffc000bc1f1 100644 --- a/sound/soc/fsl/fsl_asrc_dma.c +++ b/sound/soc/fsl/fsl_asrc_dma.c @@ -299,9 +299,14 @@ static int fsl_asrc_dma_shutdown(struct snd_pcm_substream *substream) { struct snd_pcm_runtime *runtime = substream->runtime; struct fsl_asrc_pair *pair = runtime->private_data; - struct fsl_asrc *asrc_priv = pair->asrc_priv; + struct fsl_asrc *asrc_priv; + + if (!pair) + return 0; + + asrc_priv = pair->asrc_priv; - if (pair && asrc_priv->pair[pair->index] == pair) + if (asrc_priv->pair[pair->index] == pair) asrc_priv->pair[pair->index] = NULL; kfree(pair); |