aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorWey-Yi Guy <wey-yi.w.guy@intel.com>2009-10-09 16:20:17 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-10-12 15:55:52 -0400
commitd7c76f4c50887a7d7279373c1138ac56a1d6db3b (patch)
tree3c08f507d6352c6f69b501b2cd92368dc27d42b4 /drivers
parent10c435f18b8cb78a5870c08d52955594f5ec9c31 (diff)
iwlwifi: change the order of freeing memory
Need to free the dynamic allocated memory before ieee80211_free_hw(); once call ieee80211_free_hw(), should not reference to "priv" data structure. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index cdc07c477457..9b5ea8ba7216 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -3105,8 +3105,8 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
3105 out_pci_disable_device: 3105 out_pci_disable_device:
3106 pci_disable_device(pdev); 3106 pci_disable_device(pdev);
3107 out_ieee80211_free_hw: 3107 out_ieee80211_free_hw:
3108 ieee80211_free_hw(priv->hw);
3109 iwl_free_traffic_mem(priv); 3108 iwl_free_traffic_mem(priv);
3109 ieee80211_free_hw(priv->hw);
3110 out: 3110 out:
3111 return err; 3111 return err;
3112} 3112}
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index c390dbd877e4..837a193221cf 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -4096,8 +4096,8 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
4096 pci_set_drvdata(pdev, NULL); 4096 pci_set_drvdata(pdev, NULL);
4097 pci_disable_device(pdev); 4097 pci_disable_device(pdev);
4098 out_ieee80211_free_hw: 4098 out_ieee80211_free_hw:
4099 ieee80211_free_hw(priv->hw);
4100 iwl_free_traffic_mem(priv); 4099 iwl_free_traffic_mem(priv);
4100 ieee80211_free_hw(priv->hw);
4101 out: 4101 out:
4102 return err; 4102 return err;
4103} 4103}