Commit ffc26918 authored by Frank Mandarino's avatar Frank Mandarino Committed by 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: default avatarFrank Mandarino <fmandarino@endrelia.com>
Signed-off-by: default avatarLiam Girdwood <lg@opensource.wolfsonmicro.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarJaroslav Kysela <perex@suse.cz>
parent ad5e7737
...@@ -296,6 +296,13 @@ static int at91_i2s_startup(struct snd_pcm_substream *substream) ...@@ -296,6 +296,13 @@ static int at91_i2s_startup(struct snd_pcm_substream *substream)
ssc_p->dir_mask |= dir_mask; ssc_p->dir_mask |= dir_mask;
spin_unlock_irq(&ssc_p->lock); 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; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment