iwlwifi: check return value of pci_enable_device
authorWinkler, Tomas <tomas.winkler@intel.com>
Tue, 27 Jan 2009 22:27:55 +0000 (14:27 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 9 Feb 2009 20:03:33 +0000 (15:03 -0500)
pci_enable_device is tagged with __must_check therefore
don't ignore the return value in pci_resume handlers

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/iwlwifi/iwl3945-base.c

index c54a9bcbb2e1c09d53b854844ece5fa1d3bbcdf7..ad6403395e43e0c97ad9bfbcc50afbb6b843625c 100644 (file)
@@ -3767,9 +3767,12 @@ static int iwl_pci_suspend(struct pci_dev *pdev, pm_message_t state)
 static int iwl_pci_resume(struct pci_dev *pdev)
 {
        struct iwl_priv *priv = pci_get_drvdata(pdev);
+       int ret;
 
        pci_set_power_state(pdev, PCI_D0);
-       pci_enable_device(pdev);
+       ret = pci_enable_device(pdev);
+       if (ret)
+               return ret;
        pci_restore_state(pdev);
        iwl_enable_interrupts(priv);
 
index 72ff20e10aa67eecc927232470b8c33511c41987..346a3018d8a5ad47b64c52647fedaa66d68643f2 100644 (file)
@@ -5824,9 +5824,12 @@ static int iwl3945_pci_suspend(struct pci_dev *pdev, pm_message_t state)
 static int iwl3945_pci_resume(struct pci_dev *pdev)
 {
        struct iwl_priv *priv = pci_get_drvdata(pdev);
+       int ret;
 
        pci_set_power_state(pdev, PCI_D0);
-       pci_enable_device(pdev);
+       ret = pci_enable_device(pdev);
+       if (ret)
+               return ret;
        pci_restore_state(pdev);
 
        if (priv->is_open)