From ec13514954830e4b13a44bcd5b24899426fcf332 Mon Sep 17 00:00:00 2001 From: Vlad Karpovich Date: Wed, 13 Jun 2018 14:35:43 -0500 Subject: [PATCH] ASoC: wm_adsp: Fix Preload control name. Set suffix to an empty string if it is NULL to avoid adding (NULL) to the conroll name. Change-Id: I61e2b93cbda10b6ba5300b652b6fb0f6c49057bf Signed-off-by: vkarp Signed-off-by: Ravi Vembu Mot-CRs-fixed: (CR) Reviewed-on: https://gerrit.mot.com/1193034 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Submit-Approved: Jira Key --- sound/soc/codecs/wm_adsp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c index 08c8300027d3..d262751c95cd 100644 --- a/sound/soc/codecs/wm_adsp.c +++ b/sound/soc/codecs/wm_adsp.c @@ -3461,6 +3461,8 @@ int wm_adsp2_preloader_put(struct snd_kcontrol *kcontrol, (struct soc_mixer_control *)kcontrol->private_value; char preload[32]; + if (!dsp->suffix) + dsp->suffix = ""; if (codec->component.name_prefix) snprintf(preload, ARRAY_SIZE(preload), "%s DSP%u%s Preload", codec->component.name_prefix, mc->shift, dsp->suffix);