summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-dapm.c
diff options
context:
space:
mode:
authorMark Brown2013-08-13 11:19:52 +0200
committerMark Brown2013-08-13 11:19:52 +0200
commitf2e537425a6eae2d70ece5f62c26611f316b70f9 (patch)
treec45b18a2f640ebd945a61c601ab3a83d6c1c34b7 /sound/soc/soc-dapm.c
parentMerge tag 'v3.11-rc5' into asoc-dapm (diff)
parentASoC: dapm: Fix empty list check in dapm_new_mux() (diff)
downloadkernel-qcow2-linux-f2e537425a6eae2d70ece5f62c26611f316b70f9.tar.gz
kernel-qcow2-linux-f2e537425a6eae2d70ece5f62c26611f316b70f9.tar.xz
kernel-qcow2-linux-f2e537425a6eae2d70ece5f62c26611f316b70f9.zip
Merge remote-tracking branch 'asoc/fix/dapm' into asoc-dapm
Diffstat (limited to 'sound/soc/soc-dapm.c')
-rw-r--r--sound/soc/soc-dapm.c7
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;