diff options
author | Mark Brown <broonie@linaro.org> | 2014-03-14 12:32:15 +0000 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-03-14 12:32:15 +0000 |
commit | f58d5ed0c4c47aa8dbcc4f7a58e4c52752ce6511 (patch) | |
tree | fb4b04d21b4d8654b0e7a615f2b3bc445b48d08c /sound/soc/soc-dapm.c | |
parent | 8bb495e3f02401ee6f76d1b1d77f3ac9f079e376 (diff) | |
parent | eb192460ccd50e73475b6092a8953ef7945921c8 (diff) |
Merge branch 'linux-linaro-lsk-v3.10/be/32/core-20140413' of git://git.linaro.org/people/victor.kamensky/linux-linaro-tracking-be into lsk-v3.10-bev3.10/topic/old-arm64-bev3.10/topic/be
Diffstat (limited to 'sound/soc/soc-dapm.c')
-rw-r--r-- | sound/soc/soc-dapm.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index c7051c457b75..c2ecb4e01597 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -682,13 +682,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; @@ -1796,7 +1797,7 @@ static ssize_t dapm_widget_power_read_file(struct file *file, w->active ? "active" : "inactive"); list_for_each_entry(p, &w->sources, list_sink) { - if (p->connected && !p->connected(w, p->sink)) + if (p->connected && !p->connected(w, p->source)) continue; if (p->connect) |