From: Clemens Ladisch Date: Fri, 22 Feb 2008 17:47:44 +0000 (+0100) Subject: [ALSA] bt87X: fix freeing of shared interrupt X-Git-Tag: firefly_0821_release~22333 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=2f93d797ea92113a73c72728c475455cb1409fb3;p=firefly-linux-kernel-4.4.55.git [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 Signed-off-by: Takashi Iwai Signed-off-by: Linus Torvalds --- 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 = { static int snd_bt87x_free(struct snd_bt87x *chip) { - if (chip->mmio) { + if (chip->mmio) snd_bt87x_stop(chip); - if (chip->irq >= 0) - synchronize_irq(chip->irq); - - iounmap(chip->mmio); - } if (chip->irq >= 0) free_irq(chip->irq, chip); + if (chip->mmio) + iounmap(chip->mmio); pci_release_regions(chip->pci); pci_disable_device(chip->pci); kfree(chip);