diff options
author | Frank Mandarino <fmandarino@endrelia.com> | 2007-01-08 04:58:47 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2007-02-09 03:02:54 -0500 |
commit | ffc26918ab5674b286a4bc07dac7e011cea83e97 (patch) | |
tree | 86fb6769a475d14498c694653b7b86e90b0d951c /sound/soc/at91 | |
parent | ad5e773750aeae3ad980f94b9f3cecad5af7c53d (diff) |
[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: Frank Mandarino <fmandarino@endrelia.com>
Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/soc/at91')
-rw-r--r-- | sound/soc/at91/at91-i2s.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/soc/at91/at91-i2s.c b/sound/soc/at91/at91-i2s.c index 203e6948cd99..876d391c7013 100644 --- a/sound/soc/at91/at91-i2s.c +++ b/sound/soc/at91/at91-i2s.c | |||
@@ -296,6 +296,13 @@ static int at91_i2s_startup(struct snd_pcm_substream *substream) | |||
296 | ssc_p->dir_mask |= dir_mask; | 296 | ssc_p->dir_mask |= dir_mask; |
297 | spin_unlock_irq(&ssc_p->lock); | 297 | spin_unlock_irq(&ssc_p->lock); |
298 | 298 | ||
299 | /* | ||
300 | * dma_data is not set until hw_params() is called and | ||
301 | * shutdown() depends on this value being NULL if hw_params() | ||
302 | * was not called. | ||
303 | */ | ||
304 | rtd->cpu_dai->dma_data = NULL; | ||
305 | |||
299 | return 0; | 306 | return 0; |
300 | } | 307 | } |
301 | 308 | ||