]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: Tegra: tegra_pcm_deallocate_dma_buffer: Don't OOPS
authorStephen Warren <swarren@nvidia.com>
Thu, 4 Aug 2011 22:44:42 +0000 (16:44 -0600)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 9 Aug 2011 00:40:57 +0000 (09:40 +0900)
commita9b41901d6b6342b1fa5d7ae5f5432d572345d78
treeb6c1ac738bd363db83e2ac7ec990474170591450
parent26bd5791af904c2d94a58e7adbda0c24090a3227
ASoC: Tegra: tegra_pcm_deallocate_dma_buffer: Don't OOPS

Not all PCM devices have all sub-streams. Specifically, the SPDIF driver
only supports playback and hence has no capture substream. Check whether
a substream exists before dereferencing it, when de-allocating DMA
buffers in tegra_pcm_deallocate_dma_buffer.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
sound/soc/tegra/tegra_pcm.c