ath9k: IRQ should be disabled before calling free_irq()
authorSenthil Balasubramanian <senthilkumar@atheros.com>
Thu, 13 Nov 2008 12:30:37 +0000 (18:00 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 25 Nov 2008 21:41:30 +0000 (16:41 -0500)
ath9k frees irq even before IRQs are disabled and existing IRQs
are flushed when rfkill_register() fails.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath9k/main.c

index ce94ede..1ebf606 100644 (file)
@@ -810,9 +810,9 @@ static int ath_start_rfkill_poll(struct ath_softc *sc)
                        rfkill_free(sc->rf_kill.rfkill);
 
                        /* Deinitialize the device */
+                       ath_detach(sc);
                        if (sc->pdev->irq)
                                free_irq(sc->pdev->irq, sc);
-                       ath_detach(sc);
                        pci_iounmap(sc->pdev, sc->mem);
                        pci_release_region(sc->pdev, 0);
                        pci_disable_device(sc->pdev);