Commit 2f93d797 authored by Clemens Ladisch's avatar Clemens Ladisch Committed by Linus Torvalds

[ALSA] bt87X: fix freeing of shared interrupt

Call free_irq() after iounmap() because other devices could trigger our
shared interrupt handler.
Signed-off-by: default avatarClemens Ladisch <clemens@ladisch.de>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent c6cd7d7e
...@@ -681,15 +681,12 @@ static struct snd_kcontrol_new snd_bt87x_capture_source = { ...@@ -681,15 +681,12 @@ static struct snd_kcontrol_new snd_bt87x_capture_source = {
static int snd_bt87x_free(struct snd_bt87x *chip) static int snd_bt87x_free(struct snd_bt87x *chip)
{ {
if (chip->mmio) { if (chip->mmio)
snd_bt87x_stop(chip); snd_bt87x_stop(chip);
if (chip->irq >= 0)
synchronize_irq(chip->irq);
iounmap(chip->mmio);
}
if (chip->irq >= 0) if (chip->irq >= 0)
free_irq(chip->irq, chip); free_irq(chip->irq, chip);
if (chip->mmio)
iounmap(chip->mmio);
pci_release_regions(chip->pci); pci_release_regions(chip->pci);
pci_disable_device(chip->pci); pci_disable_device(chip->pci);
kfree(chip); kfree(chip);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment