summaryrefslogtreecommitdiff
path: root/sound/soc/soc-core.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-04-07 08:27:06 +0900
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-04-07 08:27:06 +0900
commitd9b3e4c5156476a4baf0d7e0f47ba2816b4fff8e (patch)
treec0dc062c3e318b1b429b489bdbdda411e16053e2 /sound/soc/soc-core.c
parentfb631eae1f2171033327e1b9ab427d4a113dc179 (diff)
parentbaa8160382e2818179d025063697ce0a471ec48f (diff)
downloadlinux-3.10-d9b3e4c5156476a4baf0d7e0f47ba2816b4fff8e.tar.gz
linux-3.10-d9b3e4c5156476a4baf0d7e0f47ba2816b4fff8e.tar.bz2
linux-3.10-d9b3e4c5156476a4baf0d7e0f47ba2816b4fff8e.zip
Merge branch 'for-2.6.39' into for-2.6.40
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r--sound/soc/soc-core.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 1c7e82a4c80..f31afe9d4ed 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -629,6 +629,7 @@ static int soc_pcm_open(struct snd_pcm_substream *substream)
runtime->hw.rates |= codec_dai_drv->capture.rates;
}
+ ret = -EINVAL;
snd_pcm_limit_hw_rates(runtime);
if (!runtime->hw.rates) {
printk(KERN_ERR "asoc: %s <-> %s No matching rates\n",
@@ -640,7 +641,8 @@ static int soc_pcm_open(struct snd_pcm_substream *substream)
codec_dai->name, cpu_dai->name);
goto config_err;
}
- if (!runtime->hw.channels_min || !runtime->hw.channels_max) {
+ if (!runtime->hw.channels_min || !runtime->hw.channels_max ||
+ runtime->hw.channels_min > runtime->hw.channels_max) {
printk(KERN_ERR "asoc: %s <-> %s No matching channels\n",
codec_dai->name, cpu_dai->name);
goto config_err;