Commit ec67b19f authored by Mark Brown's avatar Mark Brown

Merge remote-tracking branches 'asoc/topic/tlv320aic32x4',...

Merge remote-tracking branches 'asoc/topic/tlv320aic32x4', 'asoc/topic/tlv320aic3x', 'asoc/topic/tlv320dac33', 'asoc/topic/topology' and 'asoc/topic/tscs42xx' into asoc-next
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -504,6 +504,9 @@ static void remove_widget(struct snd_soc_component *comp,
if (dobj->ops && dobj->ops->widget_unload)
dobj->ops->widget_unload(comp, dobj);
if (!w->kcontrols)
goto free_news;
/*
* Dynamic Widgets either have 1..N enum kcontrols or mixers.
* The enum may either have an array of values or strings.
......@@ -525,7 +528,6 @@ static void remove_widget(struct snd_soc_component *comp,
kfree(se);
kfree(w->kcontrol_news[i].name);
}
kfree(w->kcontrol_news);
} else {
/* volume mixer or bytes controls */
for (i = 0; i < w->num_kcontrols; i++) {
......@@ -543,8 +545,11 @@ static void remove_widget(struct snd_soc_component *comp,
snd_ctl_remove(card, kcontrol);
kfree(w->kcontrol_news[i].name);
}
kfree(w->kcontrol_news);
}
free_news:
kfree(w->kcontrol_news);
/* widget w is freed by soc-dapm.c */
}
......@@ -1276,6 +1281,9 @@ static struct snd_kcontrol_new *soc_tplg_dapm_widget_dmixer_create(
kfree(sm);
continue;
}
/* create any TLV data */
soc_tplg_create_tlv(tplg, &kc[i], &mc->hdr);
}
return kc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment