提交 450154e4 编写于 作者: W Winkler, Tomas 提交者: John W. Linville

iwlwifi: check return value of pci_enable_device

pci_enable_device is tagged with __must_check therefore
don't ignore the return value in pci_resume handlers
Signed-off-by: NTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: NReinette Chatre <reinette.chatre@intel.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 dfb39e82
......@@ -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);
......
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册