1
0
Fork 0

Merge remote-tracking branch 'asoc/fix/dapm' into asoc-linus

hifive-unleashed-5.1
Mark Brown 2015-05-12 20:31:32 +01:00
commit 12a0423149
1 changed files with 8 additions and 3 deletions

View File

@ -3100,11 +3100,16 @@ snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm,
}
prefix = soc_dapm_prefix(dapm);
if (prefix)
if (prefix) {
w->name = kasprintf(GFP_KERNEL, "%s %s", prefix, widget->name);
else
if (widget->sname)
w->sname = kasprintf(GFP_KERNEL, "%s %s", prefix,
widget->sname);
} else {
w->name = kasprintf(GFP_KERNEL, "%s", widget->name);
if (widget->sname)
w->sname = kasprintf(GFP_KERNEL, "%s", widget->sname);
}
if (w->name == NULL) {
kfree(w);
return NULL;