From 31584ed18c073176a7ad96ddbfd09765e21e813d Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Fri, 7 Nov 2014 14:12:34 +0100 Subject: ALSA: snd_ctl_activate_id(): Fix index look-up We want to know the offset for the id that was passed to the function, not the offset of the first id of the control (which is always 0). Signed-off-by: Lars-Peter Clausen Signed-off-by: Takashi Iwai --- sound/core/control.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/core/control.c b/sound/core/control.c index 99aa3aa157ba..bb96a467e88d 100644 --- a/sound/core/control.c +++ b/sound/core/control.c @@ -572,7 +572,7 @@ int snd_ctl_activate_id(struct snd_card *card, struct snd_ctl_elem_id *id, ret = -ENOENT; goto unlock; } - index_offset = snd_ctl_get_ioff(kctl, &kctl->id); + index_offset = snd_ctl_get_ioff(kctl, id); vd = &kctl->vd[index_offset]; ret = 0; if (active) { -- cgit v1.2.3