aboutsummaryrefslogtreecommitdiffstats
path: root/sound/drivers
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2021-04-09 09:56:58 +0200
committerTakashi Iwai <tiwai@suse.de>2021-04-09 09:57:03 +0200
commit473d5ae82d73c3b21160b725af0e247fa94d7832 (patch)
treed70bec96f7539abab14ea5566a74c6c255aab1d2 /sound/drivers
parentALSA: control: Add memory consumption limit to user controls (diff)
parentALSA: hda/realtek: Fix speaker amp setup on Acer Aspire E1 (diff)
downloadlinux-dev-473d5ae82d73c3b21160b725af0e247fa94d7832.tar.xz
linux-dev-473d5ae82d73c3b21160b725af0e247fa94d7832.zip
Merge branch 'for-linus' into for-next
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/drivers')
-rw-r--r--sound/drivers/aloop.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sound/drivers/aloop.c b/sound/drivers/aloop.c
index 52637180af33..80b814b9922a 100644
--- a/sound/drivers/aloop.c
+++ b/sound/drivers/aloop.c
@@ -1571,6 +1571,14 @@ static int loopback_mixer_new(struct loopback *loopback, int notify)
return -ENOMEM;
kctl->id.device = dev;
kctl->id.subdevice = substr;
+
+ /* Add the control before copying the id so that
+ * the numid field of the id is set in the copy.
+ */
+ err = snd_ctl_add(card, kctl);
+ if (err < 0)
+ return err;
+
switch (idx) {
case ACTIVE_IDX:
setup->active_id = kctl->id;
@@ -1587,9 +1595,6 @@ static int loopback_mixer_new(struct loopback *loopback, int notify)
default:
break;
}
- err = snd_ctl_add(card, kctl);
- if (err < 0)
- return err;
}
}
}