summaryrefslogtreecommitdiffstats
path: root/sound/arm
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-04-03 12:28:29 +0200
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-04-03 12:28:29 +0200
commit1b4610ebf37a05a65e9f29cdf4d87c207573104d (patch)
treef2c035b44a47e4ea663449e7e2138524805d3eba /sound/arm
parentLinux 2.6.39-rc1 (diff)
parentASoC: PXA: Fix oops in __pxa2xx_pcm_prepare (diff)
downloadlinux-1b4610ebf37a05a65e9f29cdf4d87c207573104d.tar.xz
linux-1b4610ebf37a05a65e9f29cdf4d87c207573104d.zip
Merge branch 'for-2.6.39' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6 into for-2.6.39
Diffstat (limited to 'sound/arm')
-rw-r--r--sound/arm/pxa2xx-pcm-lib.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/arm/pxa2xx-pcm-lib.c b/sound/arm/pxa2xx-pcm-lib.c
index 8808b82311b1..76e0d5695075 100644
--- a/sound/arm/pxa2xx-pcm-lib.c
+++ b/sound/arm/pxa2xx-pcm-lib.c
@@ -140,6 +140,9 @@ int __pxa2xx_pcm_prepare(struct snd_pcm_substream *substream)
if (!prtd || !prtd->params)
return 0;
+ if (prtd->dma_ch == -1)
+ return -EINVAL;
+
DCSR(prtd->dma_ch) &= ~DCSR_RUN;
DCSR(prtd->dma_ch) = 0;
DCMD(prtd->dma_ch) = 0;