diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-04-07 08:27:06 +0900 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-04-07 08:27:06 +0900 |
commit | d9b3e4c5156476a4baf0d7e0f47ba2816b4fff8e (patch) | |
tree | c0dc062c3e318b1b429b489bdbdda411e16053e2 /sound/soc/soc-core.c | |
parent | fb631eae1f2171033327e1b9ab427d4a113dc179 (diff) | |
parent | baa8160382e2818179d025063697ce0a471ec48f (diff) | |
download | op-kernel-dev-d9b3e4c5156476a4baf0d7e0f47ba2816b4fff8e.zip op-kernel-dev-d9b3e4c5156476a4baf0d7e0f47ba2816b4fff8e.tar.gz |
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.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 1c7e82a..f31afe9 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; |