diff options
-rw-r--r-- | sound/soc/soc-dapm.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 7da6d0db40f2..735903a74675 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c | |||
@@ -332,7 +332,7 @@ static int dapm_new_mixer(struct snd_soc_codec *codec, | |||
332 | * kcontrol name. | 332 | * kcontrol name. |
333 | */ | 333 | */ |
334 | name_len = strlen(w->kcontrols[i].name) + 1; | 334 | name_len = strlen(w->kcontrols[i].name) + 1; |
335 | if (w->id == snd_soc_dapm_mixer) | 335 | if (w->id != snd_soc_dapm_mixer_named_ctl) |
336 | name_len += 1 + strlen(w->name); | 336 | name_len += 1 + strlen(w->name); |
337 | 337 | ||
338 | path->long_name = kmalloc(name_len, GFP_KERNEL); | 338 | path->long_name = kmalloc(name_len, GFP_KERNEL); |
@@ -341,15 +341,14 @@ static int dapm_new_mixer(struct snd_soc_codec *codec, | |||
341 | return -ENOMEM; | 341 | return -ENOMEM; |
342 | 342 | ||
343 | switch (w->id) { | 343 | switch (w->id) { |
344 | case snd_soc_dapm_mixer: | ||
345 | default: | 344 | default: |
346 | snprintf(path->long_name, name_len, "%s %s", | 345 | snprintf(path->long_name, name_len, "%s %s", |
347 | w->name, w->kcontrols[i].name); | 346 | w->name, w->kcontrols[i].name); |
348 | break; | 347 | break; |
349 | case snd_soc_dapm_mixer_named_ctl: | 348 | case snd_soc_dapm_mixer_named_ctl: |
350 | snprintf(path->long_name, name_len, "%s", | 349 | snprintf(path->long_name, name_len, "%s", |
351 | w->kcontrols[i].name); | 350 | w->kcontrols[i].name); |
352 | break; | 351 | break; |
353 | } | 352 | } |
354 | 353 | ||
355 | path->long_name[name_len - 1] = '\0'; | 354 | path->long_name[name_len - 1] = '\0'; |