diff options
author | Mark Brown <broonie@kernel.org> | 2018-04-26 12:24:28 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-04-26 12:24:28 +0100 |
commit | c0c0be9d12bb5983569f796954f4734734c0aaac (patch) | |
tree | 37bc91adec0eaa25c9257849d0ddfad278073519 /sound/soc/soc-topology.c | |
parent | e4b31b816c472ba5907b01a6f6a1626c1e8d51ef (diff) | |
parent | 572e6c8dd174bc6fc7ba5d9b6935e9ec8d2660f5 (diff) |
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) { |