提交 ffc26918 编写于 作者: F Frank Mandarino 提交者: Jaroslav Kysela

[ALSA] ASoC at91 - Fix NULL pointer dereference in at91_i2s_shutdown

This patch fixes a NULL pointer exception which occurs when a
substream is opened and immediately closed.
Signed-off-by: NFrank Mandarino <fmandarino@endrelia.com>
Signed-off-by: NLiam Girdwood <lg@opensource.wolfsonmicro.com>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
Signed-off-by: NJaroslav Kysela <perex@suse.cz>
上级 ad5e7737
......@@ -296,6 +296,13 @@ static int at91_i2s_startup(struct snd_pcm_substream *substream)
ssc_p->dir_mask |= dir_mask;
spin_unlock_irq(&ssc_p->lock);
/*
* dma_data is not set until hw_params() is called and
* shutdown() depends on this value being NULL if hw_params()
* was not called.
*/
rtd->cpu_dai->dma_data = NULL;
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册