aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2008-03-22 05:11:08 -0400
committerTakashi Iwai <tiwai@suse.de>2008-04-24 06:00:30 -0400
commit95866d38028c98ea4d6df6947f6ea3fd77334382 (patch)
tree764c1813ca0d4102078ede92be81cb565b3094d4 /sound
parentcd97f47df377d2371940b69fa4c8b4d99a980580 (diff)
[ALSA] ymfpci - Fix race at removal
free_irq() must be called first to avoid races at removal. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/ymfpci/ymfpci_main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/pci/ymfpci/ymfpci_main.c b/sound/pci/ymfpci/ymfpci_main.c
index 42c1eb7d35f5..29b3056c5109 100644
--- a/sound/pci/ymfpci/ymfpci_main.c
+++ b/sound/pci/ymfpci/ymfpci_main.c
@@ -2249,6 +2249,8 @@ static int snd_ymfpci_free(struct snd_ymfpci *chip)
2249#ifdef CONFIG_PM 2249#ifdef CONFIG_PM
2250 vfree(chip->saved_regs); 2250 vfree(chip->saved_regs);
2251#endif 2251#endif
2252 if (chip->irq >= 0)
2253 free_irq(chip->irq, chip);
2252 release_and_free_resource(chip->mpu_res); 2254 release_and_free_resource(chip->mpu_res);
2253 release_and_free_resource(chip->fm_res); 2255 release_and_free_resource(chip->fm_res);
2254 snd_ymfpci_free_gameport(chip); 2256 snd_ymfpci_free_gameport(chip);
@@ -2257,8 +2259,6 @@ static int snd_ymfpci_free(struct snd_ymfpci *chip)
2257 if (chip->work_ptr.area) 2259 if (chip->work_ptr.area)
2258 snd_dma_free_pages(&chip->work_ptr); 2260 snd_dma_free_pages(&chip->work_ptr);
2259 2261
2260 if (chip->irq >= 0)
2261 free_irq(chip->irq, chip);
2262 release_and_free_resource(chip->res_reg_area); 2262 release_and_free_resource(chip->res_reg_area);
2263 2263
2264 pci_write_config_word(chip->pci, 0x40, chip->old_legacy_ctrl); 2264 pci_write_config_word(chip->pci, 0x40, chip->old_legacy_ctrl);