Skip to content

Commit

Permalink
e1000: error out if we cannot enable PCI device on resume
Browse files Browse the repository at this point in the history
Do not ignore errors returned by pci_enable_device, instead error out.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
  • Loading branch information
Auke Kok authored and Auke Kok committed Aug 28, 2006
1 parent 3fbbc72 commit 3d1dd8c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/net/e1000/e1000_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4709,11 +4709,14 @@ e1000_resume(struct pci_dev *pdev)
{
struct net_device *netdev = pci_get_drvdata(pdev);
struct e1000_adapter *adapter = netdev_priv(netdev);
uint32_t manc, ret_val;
uint32_t manc, err;

pci_set_power_state(pdev, PCI_D0);
e1000_pci_restore_state(adapter);
ret_val = pci_enable_device(pdev);
if ((err = pci_enable_device(pdev))) {
printk(KERN_ERR "e1000: Cannot enable PCI device from suspend\n");
return err;
}
pci_set_master(pdev);

pci_enable_wake(pdev, PCI_D3hot, 0);
Expand Down

0 comments on commit 3d1dd8c

Please sign in to comment.