diff options
author | Takashi Iwai <tiwai@suse.de> | 2011-08-12 18:26:38 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-08-12 18:26:38 +0200 |
commit | c012cdc858db36ff2314469930bfcfb00eef6f29 (patch) | |
tree | 6038ccd1dec55f82642f6036a75af57cb6b2a921 /sound/soc/tegra/tegra_pcm.c | |
parent | 15439bde3af7ff88459ea2b5520b77312e958df2 (diff) | |
parent | f6b864a9071e21186476910613ec9913b56067a2 (diff) |
Merge branch 'fix/asoc' into for-linus
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) static void tegra_pcm_deallocate_dma_buffer(struct snd_pcm *pcm, int stream) { - struct snd_pcm_substream *substream = pcm->streams[stream].substream; - struct snd_dma_buffer *buf = &substream->dma_buffer; + struct snd_pcm_substream *substream; + struct snd_dma_buffer *buf; + + substream = pcm->streams[stream].substream; + if (!substream) + return; + buf = &substream->dma_buffer; if (!buf->area) return; |