summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-dapm.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-06-22 12:21:49 +0100
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-06-23 12:11:31 +0100
commit62d4a4b99dfd647ef88b8434334eaa7497602857 (patch)
tree4ca37612d7852f72403a05b4fd891f5696a4c107 /sound/soc/soc-dapm.c
parent229e3fdc1ba49b747e9434b55b3f6bd68a4db251 (diff)
downloadlinux-stable-62d4a4b99dfd647ef88b8434334eaa7497602857.tar.gz
linux-stable-62d4a4b99dfd647ef88b8434334eaa7497602857.tar.bz2
linux-stable-62d4a4b99dfd647ef88b8434334eaa7497602857.zip
ASoC: dapm: Try to add all routes even if one fails
We may as well print as many errors as we can in one go rather than requiring developers to iterate through all their typos. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
Diffstat (limited to 'sound/soc/soc-dapm.c')
-rw-r--r--sound/soc/soc-dapm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 7365fed1ba74..32fbf10127f1 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -2276,15 +2276,15 @@ err:
int snd_soc_dapm_add_routes(struct snd_soc_dapm_context *dapm,
const struct snd_soc_dapm_route *route, int num)
{
- int i, ret = 0;
+ int i, r, ret = 0;
mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_INIT);
for (i = 0; i < num; i++) {
- ret = snd_soc_dapm_add_route(dapm, route);
- if (ret < 0) {
+ r = snd_soc_dapm_add_route(dapm, route);
+ if (r < 0) {
dev_err(dapm->dev, "Failed to add route %s->%s\n",
route->source, route->sink);
- break;
+ ret = r;
}
route++;
}