aboutsummaryrefslogtreecommitdiff
path: root/sound/soc/tegra/tegra_pcm.c
diff options
context:
space:
mode:
authorNicolas Pitre <nicolas.pitre@linaro.org>2011-08-17 22:47:15 -0400
committerNicolas Pitre <nicolas.pitre@linaro.org>2011-08-17 22:47:15 -0400
commitdbf7603a92cd895b8c1017734bc30fd9a32fd933 (patch)
tree7e0e8c35d5db964ee43494a721dee3c486e4e458 /sound/soc/tegra/tegra_pcm.c
parent044c31fdf80ed9d8e6bfb33913d085c3efc6febe (diff)
parentd31bf2883542cd3414674238f94123bd1d9c0b9f (diff)
Merge commit 'v3.0.3' into linaro-3.0linux-linaro-3.0-2011.08-0
Diffstat (limited to 'sound/soc/tegra/tegra_pcm.c')
-rw-r--r--sound/soc/tegra/tegra_pcm.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sound/soc/tegra/tegra_pcm.c b/sound/soc/tegra/tegra_pcm.c
index 3c271f95358..620171051e6 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;