diff options
author | Mark Brown <broonie@kernel.org> | 2018-04-26 13:24:28 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-04-26 13:24:28 +0200 |
commit | c0c0be9d12bb5983569f796954f4734734c0aaac (patch) | |
tree | 37bc91adec0eaa25c9257849d0ddfad278073519 /sound/soc/soc-topology.c | |
parent | ASoC: mediatek: use snd_soc_dai_get_drvdata() to get the private data (diff) | |
parent | ASoC: compress: Only call free for components which have been opened (diff) | |
download | linux-c0c0be9d12bb5983569f796954f4734734c0aaac.tar.xz linux-c0c0be9d12bb5983569f796954f4734734c0aaac.zip |
Merge branch 'asoc-4.17' into asoc-4.18 for compress dependencies
Diffstat (limited to 'sound/soc/soc-topology.c')
-rw-r--r-- | sound/soc/soc-topology.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c index de08693be9e1..f25ea9aab235 100644 --- a/sound/soc/soc-topology.c +++ b/sound/soc/soc-topology.c @@ -513,7 +513,7 @@ static void remove_widget(struct snd_soc_component *comp, */ if (dobj->widget.kcontrol_type == SND_SOC_TPLG_TYPE_ENUM) { /* enumerated widget mixer */ - for (i = 0; i < w->num_kcontrols; i++) { + for (i = 0; w->kcontrols != NULL && i < w->num_kcontrols; i++) { struct snd_kcontrol *kcontrol = w->kcontrols[i]; struct soc_enum *se = (struct soc_enum *)kcontrol->private_value; @@ -530,7 +530,7 @@ static void remove_widget(struct snd_soc_component *comp, } } else { /* volume mixer or bytes controls */ - for (i = 0; i < w->num_kcontrols; i++) { + for (i = 0; w->kcontrols != NULL && i < w->num_kcontrols; i++) { struct snd_kcontrol *kcontrol = w->kcontrols[i]; if (dobj->widget.kcontrol_type @@ -2600,7 +2600,7 @@ int snd_soc_tplg_component_remove(struct snd_soc_component *comp, u32 index) /* match index */ if (dobj->index != index && - dobj->index != SND_SOC_TPLG_INDEX_ALL) + index != SND_SOC_TPLG_INDEX_ALL) continue; switch (dobj->type) { |