diff options
Diffstat (limited to 'sound/soc/tegra/tegra_pcm.c')
-rw-r--r-- | sound/soc/tegra/tegra_pcm.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sound/soc/tegra/tegra_pcm.c b/sound/soc/tegra/tegra_pcm.c index ff86e5e3db68..c7cfd96e991e 100644 --- a/sound/soc/tegra/tegra_pcm.c +++ b/sound/soc/tegra/tegra_pcm.c | |||
@@ -309,9 +309,14 @@ static int tegra_pcm_preallocate_dma_buffer(struct snd_pcm *pcm, int stream) | |||
309 | 309 | ||
310 | static void tegra_pcm_deallocate_dma_buffer(struct snd_pcm *pcm, int stream) | 310 | static void tegra_pcm_deallocate_dma_buffer(struct snd_pcm *pcm, int stream) |
311 | { | 311 | { |
312 | struct snd_pcm_substream *substream = pcm->streams[stream].substream; | 312 | struct snd_pcm_substream *substream; |
313 | struct snd_dma_buffer *buf = &substream->dma_buffer; | 313 | struct snd_dma_buffer *buf; |
314 | |||
315 | substream = pcm->streams[stream].substream; | ||
316 | if (!substream) | ||
317 | return; | ||
314 | 318 | ||
319 | buf = &substream->dma_buffer; | ||
315 | if (!buf->area) | 320 | if (!buf->area) |
316 | return; | 321 | return; |
317 | 322 | ||