aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2008-02-22 12:47:44 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-22 17:20:09 -0500
commit2f93d797ea92113a73c72728c475455cb1409fb3 (patch)
treeddfcb87326b1687efeeb9b7e0373d4826dd55dea /sound/pci
parentc6cd7d7efe2302697a3cbde718e8e3b0d88ba706 (diff)
[ALSA] bt87X: fix freeing of shared interrupt
Call free_irq() after iounmap() because other devices could trigger our shared interrupt handler. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/bt87x.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sound/pci/bt87x.c b/sound/pci/bt87x.c
index c9a2421cf6f0..4ecdd635ed1d 100644
--- a/sound/pci/bt87x.c
+++ b/sound/pci/bt87x.c
@@ -681,15 +681,12 @@ static struct snd_kcontrol_new snd_bt87x_capture_source = {
681 681
682static int snd_bt87x_free(struct snd_bt87x *chip) 682static int snd_bt87x_free(struct snd_bt87x *chip)
683{ 683{
684 if (chip->mmio) { 684 if (chip->mmio)
685 snd_bt87x_stop(chip); 685 snd_bt87x_stop(chip);
686 if (chip->irq >= 0)
687 synchronize_irq(chip->irq);
688
689 iounmap(chip->mmio);
690 }
691 if (chip->irq >= 0) 686 if (chip->irq >= 0)
692 free_irq(chip->irq, chip); 687 free_irq(chip->irq, chip);
688 if (chip->mmio)
689 iounmap(chip->mmio);
693 pci_release_regions(chip->pci); 690 pci_release_regions(chip->pci);
694 pci_disable_device(chip->pci); 691 pci_disable_device(chip->pci);
695 kfree(chip); 692 kfree(chip);