summaryrefslogtreecommitdiff
path: root/sound/core/jack.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2022-01-05 17:38:11 +0300
committerTakashi Iwai <tiwai@suse.de>2022-01-05 17:38:34 +0300
commitf81483aaeb59da530b286fe5d081e1705eb5c886 (patch)
treea4fed750afcdf61df3a2e3c7ab4456c515651290 /sound/core/jack.c
parent08977fe8cfb7d9fe9337470eec4843081cf3a76d (diff)
parent57f234248ff925d88caedf4019ec84e6ecb83909 (diff)
downloadlinux-f81483aaeb59da530b286fe5d081e1705eb5c886.tar.xz
Merge branch 'for-next' into for-linus
Pull 5.17 materials. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/jack.c')
-rw-r--r--sound/core/jack.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/core/jack.c b/sound/core/jack.c
index 537df1e98f8a..d1e3055f2b6a 100644
--- a/sound/core/jack.c
+++ b/sound/core/jack.c
@@ -62,10 +62,13 @@ static int snd_jack_dev_free(struct snd_device *device)
struct snd_card *card = device->card;
struct snd_jack_kctl *jack_kctl, *tmp_jack_kctl;
+ down_write(&card->controls_rwsem);
list_for_each_entry_safe(jack_kctl, tmp_jack_kctl, &jack->kctl_list, list) {
list_del_init(&jack_kctl->list);
snd_ctl_remove(card, jack_kctl->kctl);
}
+ up_write(&card->controls_rwsem);
+
if (jack->private_free)
jack->private_free(jack);