提交 d0a601c2 编写于 作者: T Takashi Iwai

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: b8dd0866 'ALSA: Jack: handle jack embedded kcontrol creating within ctljack')
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 28760c19
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册