Skip to content

Commit

Permalink
Merge remote-tracking branch 'asoc/fix/dapm' into asoc-linus
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Brown committed Aug 15, 2013
2 parents c200d88 + fe58139 commit 14388a6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions sound/soc/soc-dapm.c
Original file line number Diff line number Diff line change
Expand Up @@ -679,13 +679,14 @@ static int dapm_new_mux(struct snd_soc_dapm_widget *w)
return -EINVAL;
}

path = list_first_entry(&w->sources, struct snd_soc_dapm_path,
list_sink);
if (!path) {
if (list_empty(&w->sources)) {
dev_err(dapm->dev, "ASoC: mux %s has no paths\n", w->name);
return -EINVAL;
}

path = list_first_entry(&w->sources, struct snd_soc_dapm_path,
list_sink);

ret = dapm_create_or_share_mixmux_kcontrol(w, 0, path);
if (ret < 0)
return ret;
Expand Down

0 comments on commit 14388a6

Please sign in to comment.