summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-dapm.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-08-13 10:19:52 +0100
committerMark Brown <broonie@linaro.org>2013-08-13 10:19:52 +0100
commitf2e537425a6eae2d70ece5f62c26611f316b70f9 (patch)
treec45b18a2f640ebd945a61c601ab3a83d6c1c34b7 /sound/soc/soc-dapm.c
parent4bd93343124ffe3bdc21c2b485c2668aba6651be (diff)
parentfe581391147cb3d738d961d0f1233d91a9e1113c (diff)
downloadop-kernel-dev-f2e537425a6eae2d70ece5f62c26611f316b70f9.zip
op-kernel-dev-f2e537425a6eae2d70ece5f62c26611f316b70f9.tar.gz
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 7f53d86..662a904 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;
OpenPOWER on IntegriCloud