aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2016-04-26 19:25:13 +0100
committerMark Brown <broonie@kernel.org>2016-04-26 19:25:13 +0100
commitf179f3f8a9bc86c43a1016c6d0ef87b7bb5ced86 (patch)
treed07b029d591d21e94743c096252836cdf142b145 /sound
parentLinux 4.6-rc5 (diff)
parentASoC: dapm: Make sure we have a card when displaying component widgets (diff)
downloadlinux-dev-f179f3f8a9bc86c43a1016c6d0ef87b7bb5ced86.tar.xz
linux-dev-f179f3f8a9bc86c43a1016c6d0ef87b7bb5ced86.zip
Merge remote-tracking branch 'asoc/fix/dapm' into asoc-linus
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/soc-dapm.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 801ae1a81dfd..c4464858bf01 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -2188,6 +2188,13 @@ static ssize_t dapm_widget_show_component(struct snd_soc_component *cmpnt,
int count = 0;
char *state = "not set";
+ /* card won't be set for the dummy component, as a spot fix
+ * we're checking for that case specifically here but in future
+ * we will ensure that the dummy component looks like others.
+ */
+ if (!cmpnt->card)
+ return 0;
+
list_for_each_entry(w, &cmpnt->card->widgets, list) {
if (w->dapm != dapm)
continue;