Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 305634
b: refs/heads/master
c: 60884c2
h: refs/heads/master
v: v3
  • Loading branch information
Dan Carpenter authored and Mark Brown committed Apr 15, 2012
1 parent 30c7851 commit ae269c1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7203a62562dc45dcd69339d4553fb85453d6b587
refs/heads/master: 60884c2767e0d9314a49e1ee7a0661b3464989c1
12 changes: 7 additions & 5 deletions trunk/sound/soc/soc-dapm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2131,21 +2131,21 @@ static int snd_soc_dapm_add_route(struct snd_soc_dapm_context *dapm,
int snd_soc_dapm_add_routes(struct snd_soc_dapm_context *dapm,
const struct snd_soc_dapm_route *route, int num)
{
int i, ret;
int i, 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) {
dev_err(dapm->dev, "Failed to add route %s->%s\n",
route->source, route->sink);
return ret;
break;
}
route++;
}
mutex_unlock(&dapm->card->dapm_mutex);

return 0;
return ret;
}
EXPORT_SYMBOL_GPL(snd_soc_dapm_add_routes);

Expand Down Expand Up @@ -2849,6 +2849,7 @@ int snd_soc_dapm_new_controls(struct snd_soc_dapm_context *dapm,
{
struct snd_soc_dapm_widget *w;
int i;
int ret = 0;

mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_INIT);
for (i = 0; i < num; i++) {
Expand All @@ -2857,12 +2858,13 @@ int snd_soc_dapm_new_controls(struct snd_soc_dapm_context *dapm,
dev_err(dapm->dev,
"ASoC: Failed to create DAPM control %s\n",
widget->name);
return -ENOMEM;
ret = -ENOMEM;
break;
}
widget++;
}
mutex_unlock(&dapm->card->dapm_mutex);
return 0;
return ret;
}
EXPORT_SYMBOL_GPL(snd_soc_dapm_new_controls);

Expand Down

0 comments on commit ae269c1

Please sign in to comment.