summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2018-10-27 10:13:31 +0200
committerTakashi Iwai <tiwai@suse.de>2018-10-27 16:52:58 +0200
commitaedef16a63d5d330afde4fcb54e0e73980e4a116 (patch)
tree880a636fcc4ecf56a7fad83c3ef7e5dc3e4b7a32 /sound
parentMerge tag 'asoc-v5.0-2' of https://git.kernel.org/pub/scm/linux/kernel/git/br... (diff)
downloadlinux-aedef16a63d5d330afde4fcb54e0e73980e4a116.tar.xz
linux-aedef16a63d5d330afde4fcb54e0e73980e4a116.zip
ALSA: dice: fix to wait for releases of all ALSA character devices
In a development period for Linux kernel v4.20, drivers in ALSA firewire stack were changed to wait for releases of all ALSA character devices at .remove callback of bus driver. However, ALSA dice driver is partly out of this change. This bug can bring fault to user process which holds the last of character device in unplugging. This commit fixes the driver to wait in the callback. Fixes: 61ccc6f6b27c ('ALSA: firewire: block .remove callback of bus driver till all of ALSA character devices are released') Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/firewire/dice/dice.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/firewire/dice/dice.c b/sound/firewire/dice/dice.c
index 0f6dbcffe711..ed50b222d36e 100644
--- a/sound/firewire/dice/dice.c
+++ b/sound/firewire/dice/dice.c
@@ -240,8 +240,8 @@ static void dice_remove(struct fw_unit *unit)
cancel_delayed_work_sync(&dice->dwork);
if (dice->registered) {
- /* No need to wait for releasing card object in this context. */
- snd_card_free_when_closed(dice->card);
+ // Block till all of ALSA character devices are released.
+ snd_card_free(dice->card);
}
mutex_destroy(&dice->mutex);