diff options
Diffstat (limited to 'drivers/net/myri10ge/myri10ge.c')
-rw-r--r-- | drivers/net/myri10ge/myri10ge.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c index 9bc5dab949fd..07cf574197e5 100644 --- a/drivers/net/myri10ge/myri10ge.c +++ b/drivers/net/myri10ge/myri10ge.c | |||
@@ -2540,8 +2540,8 @@ static int myri10ge_suspend(struct pci_dev *pdev, pm_message_t state) | |||
2540 | myri10ge_dummy_rdma(mgp, 0); | 2540 | myri10ge_dummy_rdma(mgp, 0); |
2541 | pci_save_state(pdev); | 2541 | pci_save_state(pdev); |
2542 | pci_disable_device(pdev); | 2542 | pci_disable_device(pdev); |
2543 | pci_set_power_state(pdev, pci_choose_state(pdev, state)); | 2543 | |
2544 | return 0; | 2544 | return pci_set_power_state(pdev, pci_choose_state(pdev, state)); |
2545 | } | 2545 | } |
2546 | 2546 | ||
2547 | static int myri10ge_resume(struct pci_dev *pdev) | 2547 | static int myri10ge_resume(struct pci_dev *pdev) |
@@ -2564,12 +2564,14 @@ static int myri10ge_resume(struct pci_dev *pdev) | |||
2564 | return -EIO; | 2564 | return -EIO; |
2565 | } | 2565 | } |
2566 | 2566 | ||
2567 | pci_restore_state(pdev); | 2567 | status = pci_restore_state(pdev); |
2568 | if (status) | ||
2569 | return status; | ||
2568 | 2570 | ||
2569 | status = pci_enable_device(pdev); | 2571 | status = pci_enable_device(pdev); |
2570 | if (status < 0) { | 2572 | if (status) { |
2571 | dev_err(&pdev->dev, "failed to enable device\n"); | 2573 | dev_err(&pdev->dev, "failed to enable device\n"); |
2572 | return -EIO; | 2574 | return status; |
2573 | } | 2575 | } |
2574 | 2576 | ||
2575 | pci_set_master(pdev); | 2577 | pci_set_master(pdev); |