summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorLu Guanqun <guanqun.lu@intel.com>2011-04-06 23:25:21 +0800
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-04-07 08:25:45 +0900
commitc51def659870d25c735a9e06648e560ab39dbbb6 (patch)
tree7f669318d162188d6252a7030d073ad4566d35c3 /sound
parentb04cfcf70b35e032071a6b482273cc642675c8e4 (diff)
downloadop-kernel-dev-c51def659870d25c735a9e06648e560ab39dbbb6.zip
op-kernel-dev-c51def659870d25c735a9e06648e560ab39dbbb6.tar.gz
ASoC: fix config error path
initialize ret to invalid value so that when we reach the config error path in soc_pcm_open, it will return the correct error code. without this patch, though config error path is executed, soc_pcm_open will return 0 in snd_pcm_open_substream and then cause double release of substream. Signed-off-by: Lu Guanqun <guanqun.lu@intel.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/soc-core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 4f42fef..d8562ce 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",
OpenPOWER on IntegriCloud