diff options
author | Mark Brown <broonie@linaro.org> | 2013-08-13 11:19:52 +0200 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-08-13 11:19:52 +0200 |
commit | f2e537425a6eae2d70ece5f62c26611f316b70f9 (patch) | |
tree | c45b18a2f640ebd945a61c601ab3a83d6c1c34b7 /sound | |
parent | Merge tag 'v3.11-rc5' into asoc-dapm (diff) | |
parent | ASoC: dapm: Fix empty list check in dapm_new_mux() (diff) | |
download | linux-f2e537425a6eae2d70ece5f62c26611f316b70f9.tar.xz linux-f2e537425a6eae2d70ece5f62c26611f316b70f9.zip |
Merge remote-tracking branch 'asoc/fix/dapm' into asoc-dapm
Diffstat (limited to 'sound')
-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) 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; |