From: Helmut Schaa Date: Thu, 12 Feb 2009 17:51:03 +0000 (+0100) Subject: iwlagn: clean up error path in iwl_pci_probe X-Git-Tag: firefly_0821_release~15237^2~460^2~114 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=795cc0ad54128ada6f54d8b1eb051a907df6387e;p=firefly-linux-kernel-4.4.55.git iwlagn: clean up error path in iwl_pci_probe This avoids triggering a BUG_ON in pci_disable_msi in the error path. Furthermore remove the first call to pci_disable_device as it is already called at out_pci_disable_device. Both issues were introduced in the patch "iwlagn: fix hw-rfkill while the interface is down". Signed-off-by: Helmut Schaa Acked-by: Reinette Chatre Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 397577c06c92..87b237d48b3c 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c @@ -3612,7 +3612,7 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) err = sysfs_create_group(&pdev->dev.kobj, &iwl_attribute_group); if (err) { IWL_ERR(priv, "failed to create sysfs device attributes\n"); - goto out_uninit_drv; + goto out_free_irq; } iwl_setup_deferred_work(priv); @@ -3657,10 +3657,10 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) out_remove_sysfs: sysfs_remove_group(&pdev->dev.kobj, &iwl_attribute_group); + out_free_irq: + free_irq(priv->pci_dev->irq, priv); out_disable_msi: pci_disable_msi(priv->pci_dev); - pci_disable_device(priv->pci_dev); - out_uninit_drv: iwl_uninit_drv(priv); out_free_eeprom: iwl_eeprom_free(priv);