Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ffc26918 authored by Frank Mandarino's avatar Frank Mandarino Committed by Jaroslav Kysela
Browse files

[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
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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;
}