aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-06-22 07:21:49 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-06-23 07:11:31 -0400
commit62d4a4b99dfd647ef88b8434334eaa7497602857 (patch)
tree4ca37612d7852f72403a05b4fd891f5696a4c107 /sound/soc
parent229e3fdc1ba49b747e9434b55b3f6bd68a4db251 (diff)
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')
-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:
2276int snd_soc_dapm_add_routes(struct snd_soc_dapm_context *dapm, 2276int snd_soc_dapm_add_routes(struct snd_soc_dapm_context *dapm,
2277 const struct snd_soc_dapm_route *route, int num) 2277 const struct snd_soc_dapm_route *route, int num)
2278{ 2278{
2279 int i, ret = 0; 2279 int i, r, ret = 0;
2280 2280
2281 mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_INIT); 2281 mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_INIT);
2282 for (i = 0; i < num; i++) { 2282 for (i = 0; i < num; i++) {
2283 ret = snd_soc_dapm_add_route(dapm, route); 2283 r = snd_soc_dapm_add_route(dapm, route);
2284 if (ret < 0) { 2284 if (r < 0) {
2285 dev_err(dapm->dev, "Failed to add route %s->%s\n", 2285 dev_err(dapm->dev, "Failed to add route %s->%s\n",
2286 route->source, route->sink); 2286 route->source, route->sink);
2287 break; 2287 ret = r;
2288 } 2288 }
2289 route++; 2289 route++;
2290 } 2290 }