diff options
author | Takashi Iwai <tiwai@suse.de> | 2015-05-29 15:06:32 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-05-29 15:06:32 +0300 |
commit | d0a601c278de6876f36bcf1b7a9678d93d7dc67b (patch) | |
tree | 94c69b365ff6218706530d9be436e0adc7b630bb /sound/core/ctljack.c | |
parent | 28760c195e22856aedbacad5eb7b46ac1d76bb90 (diff) | |
download | linux-d0a601c278de6876f36bcf1b7a9678d93d7dc67b.tar.xz |
ALSA: jack: Fix the id uniqueness check
snd_kctl_jack_new() tries to assign a unique index number when a name
string that has been already registered is passed. However, it checks
with the base string without "Jack" suffix, so it never hits.
Fix the call with the properly processed name string instead.
Fixes: b8dd086674cf 'ALSA: Jack: handle jack embedded kcontrol creating within ctljack')
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/ctljack.c')
-rw-r--r-- | sound/core/ctljack.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/core/ctljack.c b/sound/core/ctljack.c index 8f8d1033425c..9149a4aefa95 100644 --- a/sound/core/ctljack.c +++ b/sound/core/ctljack.c @@ -70,7 +70,7 @@ snd_kctl_jack_new(const char *name, struct snd_card *card) return NULL; jack_kctl_name_gen(kctl->id.name, name, sizeof(kctl->id.name)); - kctl->id.index = get_available_index(card, name); + kctl->id.index = get_available_index(card, kctl->id.name); kctl->private_value = 0; return kctl; } |