diff options
author | Mark Brown <broonie@kernel.org> | 2015-05-12 15:31:32 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-05-12 15:31:32 -0400 |
commit | 12a04231496502ab5950c8847e9cf0a28cbca1ad (patch) | |
tree | 547e64eab6bc6991a73576c55f223e435048726f /sound | |
parent | 030bbdbf4c833bc69f502eae58498bc5572db736 (diff) | |
parent | fdb6eb0a12871d5bfaf266c5a0d5259a5437a72f (diff) |
Merge remote-tracking branch 'asoc/fix/dapm' into asoc-linus
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/soc-dapm.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index defe0f0082b5..158204d08924 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c | |||
@@ -3100,11 +3100,16 @@ snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm, | |||
3100 | } | 3100 | } |
3101 | 3101 | ||
3102 | prefix = soc_dapm_prefix(dapm); | 3102 | prefix = soc_dapm_prefix(dapm); |
3103 | if (prefix) | 3103 | if (prefix) { |
3104 | w->name = kasprintf(GFP_KERNEL, "%s %s", prefix, widget->name); | 3104 | w->name = kasprintf(GFP_KERNEL, "%s %s", prefix, widget->name); |
3105 | else | 3105 | if (widget->sname) |
3106 | w->sname = kasprintf(GFP_KERNEL, "%s %s", prefix, | ||
3107 | widget->sname); | ||
3108 | } else { | ||
3106 | w->name = kasprintf(GFP_KERNEL, "%s", widget->name); | 3109 | w->name = kasprintf(GFP_KERNEL, "%s", widget->name); |
3107 | 3110 | if (widget->sname) | |
3111 | w->sname = kasprintf(GFP_KERNEL, "%s", widget->sname); | ||
3112 | } | ||
3108 | if (w->name == NULL) { | 3113 | if (w->name == NULL) { |
3109 | kfree(w); | 3114 | kfree(w); |
3110 | return NULL; | 3115 | return NULL; |