summaryrefslogtreecommitdiff
path: root/sound/soc
diff options
context:
space:
mode:
authorNicolin Chen <Guangyu.Chen@freescale.com>2014-04-21 15:14:46 +0400
committerMark Brown <broonie@linaro.org>2014-04-23 16:49:15 +0400
commit3dcba280f739772a4156fbcdae39229d6bb5e02b (patch)
treeeb18bcf739d3852c7ea8964fbb8f146ad55130e8 /sound/soc
parentab2874a8faac9db00eb03ec831b9a983627fb2d1 (diff)
downloadlinux-3dcba280f739772a4156fbcdae39229d6bb5e02b.tar.xz
ASoC: core: Don't break component searching if both id and num_dai are 0
The commit e41975ed (ASoC: core: Fix the DAI name getting) added a break within the "if (id < 0 || id >= pos->num_dai)" while the original design of the search didn't break the loop if that condition contented but only mark the ret error and let it go on to search the next component. In a case like dmaengine which's not a dai but as a component sharing an identical name with a dai, both the id and pos->num_dai here could be 0. If we break the search, we may never find the dai we want as it might be placed behind its dmaengine in the component list. So this patch fixes the issue above by following the original design to let the search carry on. Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/soc-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 7f8efea5c5b1..799cbe81fe39 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -4521,7 +4521,7 @@ int snd_soc_of_get_dai_name(struct device_node *of_node,
if (id < 0 || id >= pos->num_dai) {
ret = -EINVAL;
- break;
+ continue;
}
ret = 0;