diff options
author | Reinette Chatre <reinette.chatre@intel.com> | 2009-02-27 19:21:22 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-03-05 14:39:36 -0500 |
commit | c8f16138b5099bfd928942c3775aaecfd649e9e5 (patch) | |
tree | 817739aede583a0c784c2c7794ab9dae3c24ff48 /drivers/net/wireless/iwlwifi/iwl-agn.c | |
parent | 6e21f15cac2c6c25b6a5874a98420e1b9064f0c1 (diff) |
iwlwifi: fix *pci_probe error flow
for iwlagn:
- Have to free eeprom of version check fails - otherwise we end up with
memory leak.
- Include removal of workqueue (created in _setup_deferred_work) in error
handling.
for iwl3945:
- Fix a few places to jump to correct error handling.
- Reorganize error handling to match with code flow.
- Include iwl_free_channel_map as part of error handling.
- Include releasing eeprom as part of error handling.
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index b49f9f7a8a67..18f6f6807565 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -3405,7 +3405,7 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
3405 | } | 3405 | } |
3406 | err = iwl_eeprom_check_version(priv); | 3406 | err = iwl_eeprom_check_version(priv); |
3407 | if (err) | 3407 | if (err) |
3408 | goto out_iounmap; | 3408 | goto out_free_eeprom; |
3409 | 3409 | ||
3410 | /* extract MAC Address */ | 3410 | /* extract MAC Address */ |
3411 | iwl_eeprom_get_mac(priv, priv->mac_addr); | 3411 | iwl_eeprom_get_mac(priv, priv->mac_addr); |
@@ -3501,6 +3501,8 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
3501 | return 0; | 3501 | return 0; |
3502 | 3502 | ||
3503 | out_remove_sysfs: | 3503 | out_remove_sysfs: |
3504 | destroy_workqueue(priv->workqueue); | ||
3505 | priv->workqueue = NULL; | ||
3504 | sysfs_remove_group(&pdev->dev.kobj, &iwl_attribute_group); | 3506 | sysfs_remove_group(&pdev->dev.kobj, &iwl_attribute_group); |
3505 | out_free_irq: | 3507 | out_free_irq: |
3506 | free_irq(priv->pci_dev->irq, priv); | 3508 | free_irq(priv->pci_dev->irq, priv); |