aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/soc/soc-dapm.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 116d4436c575..1fed2207b024 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -738,8 +738,10 @@ static int dapm_new_mux(struct snd_soc_dapm_widget *w)
738 if (ret < 0) 738 if (ret < 0)
739 return ret; 739 return ret;
740 740
741 list_for_each_entry(path, &w->sources, list_sink) 741 list_for_each_entry(path, &w->sources, list_sink) {
742 dapm_kcontrol_add_path(w->kcontrols[0], path); 742 if (path->name)
743 dapm_kcontrol_add_path(w->kcontrols[0], path);
744 }
743 745
744 return 0; 746 return 0;
745} 747}
@@ -1955,9 +1957,6 @@ static int soc_dapm_mux_update_power(struct snd_soc_card *card,
1955 1957
1956 /* find dapm widget path assoc with kcontrol */ 1958 /* find dapm widget path assoc with kcontrol */
1957 dapm_kcontrol_for_each_path(path, kcontrol) { 1959 dapm_kcontrol_for_each_path(path, kcontrol) {
1958 if (!path->name || !e->texts[mux])
1959 continue;
1960
1961 found = 1; 1960 found = 1;
1962 /* we now need to match the string in the enum to the path */ 1961 /* we now need to match the string in the enum to the path */
1963 if (!(strcmp(path->name, e->texts[mux]))) 1962 if (!(strcmp(path->name, e->texts[mux])))