All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: dapm: Try to add all routes even if one fails
@ 2012-06-22 11:22 Mark Brown
  2012-06-22 18:56 ` Liam Girdwood
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2012-06-22 11:22 UTC (permalink / raw
  To: Liam Girdwood; +Cc: alsa-devel, Mark Brown

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>
---
 sound/soc/soc-dapm.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 667a941..3e7baab 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++;
 	}
-- 
1.7.10

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ASoC: dapm: Try to add all routes even if one fails
  2012-06-22 11:22 [PATCH] ASoC: dapm: Try to add all routes even if one fails Mark Brown
@ 2012-06-22 18:56 ` Liam Girdwood
  0 siblings, 0 replies; 2+ messages in thread
From: Liam Girdwood @ 2012-06-22 18:56 UTC (permalink / raw
  To: Mark Brown; +Cc: alsa-devel

On Fri, 2012-06-22 at 12:22 +0100, Mark Brown wrote:
> 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>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-06-22 18:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-22 11:22 [PATCH] ASoC: dapm: Try to add all routes even if one fails Mark Brown
2012-06-22 18:56 ` Liam Girdwood

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.