Skip to contentSkip to conversation

ath5k: re-order one of the frees on unwind

PATCH New Dan Carpenter 1 participant 1 message Aug 21, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ath5k: re-order one of the frees on unwind

There was a small misordering here. In the original code, if we were to go to err_free_ah then it wouldn't free the irq.

drivers/net/wireless/ath/ath5k/base.c +2 -2
index 373dcfe..2447507 100644
@@ -700,10 +700,10 @@ ath5k_pci_probe(struct pci_dev *pdev,
 	return 0;
 err_ah:
 	ath5k_hw_detach(sc->ah);
-err_irq:
-	free_irq(pdev->irq, sc);
 err_free_ah:
 	kfree(sc->ah);
+err_irq:
+	free_irq(pdev->irq, sc);
 err_free:
 	ieee80211_free_hw(hw);
 err_map: