diff options
author | Mark Brown <broonie@linaro.org> | 2013-08-13 05:19:52 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-08-13 05:19:52 -0400 |
commit | f2e537425a6eae2d70ece5f62c26611f316b70f9 (patch) | |
tree | c45b18a2f640ebd945a61c601ab3a83d6c1c34b7 | |
parent | 4bd93343124ffe3bdc21c2b485c2668aba6651be (diff) | |
parent | fe581391147cb3d738d961d0f1233d91a9e1113c (diff) |
Merge remote-tracking branch 'asoc/fix/dapm' into asoc-dapm
-rw-r--r-- | sound/soc/soc-dapm.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 7f53d8662297..662a904c2b79 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c | |||
@@ -813,13 +813,14 @@ static int dapm_new_mux(struct snd_soc_dapm_widget *w) | |||
813 | return -EINVAL; | 813 | return -EINVAL; |
814 | } | 814 | } |
815 | 815 | ||
816 | path = list_first_entry(&w->sources, struct snd_soc_dapm_path, | 816 | if (list_empty(&w->sources)) { |
817 | list_sink); | ||
818 | if (!path) { | ||
819 | dev_err(dapm->dev, "ASoC: mux %s has no paths\n", w->name); | 817 | dev_err(dapm->dev, "ASoC: mux %s has no paths\n", w->name); |
820 | return -EINVAL; | 818 | return -EINVAL; |
821 | } | 819 | } |
822 | 820 | ||
821 | path = list_first_entry(&w->sources, struct snd_soc_dapm_path, | ||
822 | list_sink); | ||
823 | |||
823 | ret = dapm_create_or_share_mixmux_kcontrol(w, 0, path); | 824 | ret = dapm_create_or_share_mixmux_kcontrol(w, 0, path); |
824 | if (ret < 0) | 825 | if (ret < 0) |
825 | return ret; | 826 | return ret; |