diff options
author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2006-09-17 13:41:45 -0400 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2006-09-17 13:41:45 -0400 |
commit | ea6104c22468239083857fa07425c312b1ecb424 (patch) | |
tree | ad34dd8e4cfb7f667de04f2ec89dd0db94f23427 /drivers/ieee1394 | |
parent | f0645e7720e0baacbde61d7d1f0180309451c695 (diff) |
ieee1394: ohci1394: check for errors in suspend or resume
Some of the suspend and resume litany may fail.
Tell the PCI core about it.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/ieee1394')
-rw-r--r-- | drivers/ieee1394/ohci1394.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/ieee1394/ohci1394.c b/drivers/ieee1394/ohci1394.c index 54d686aed39f..8fd0030475ba 100644 --- a/drivers/ieee1394/ohci1394.c +++ b/drivers/ieee1394/ohci1394.c | |||
@@ -3546,15 +3546,19 @@ static int ohci1394_pci_resume (struct pci_dev *pdev) | |||
3546 | 3546 | ||
3547 | pci_set_power_state(pdev, PCI_D0); | 3547 | pci_set_power_state(pdev, PCI_D0); |
3548 | pci_restore_state(pdev); | 3548 | pci_restore_state(pdev); |
3549 | pci_enable_device(pdev); | 3549 | return pci_enable_device(pdev); |
3550 | |||
3551 | return 0; | ||
3552 | } | 3550 | } |
3553 | 3551 | ||
3554 | static int ohci1394_pci_suspend (struct pci_dev *pdev, pm_message_t state) | 3552 | static int ohci1394_pci_suspend (struct pci_dev *pdev, pm_message_t state) |
3555 | { | 3553 | { |
3556 | pci_save_state(pdev); | 3554 | int err; |
3557 | pci_set_power_state(pdev, pci_choose_state(pdev, state)); | 3555 | |
3556 | err = pci_save_state(pdev); | ||
3557 | if (err) | ||
3558 | goto out; | ||
3559 | err = pci_set_power_state(pdev, pci_choose_state(pdev, state)); | ||
3560 | if (err) | ||
3561 | goto out; | ||
3558 | 3562 | ||
3559 | /* PowerMac suspend code comes last */ | 3563 | /* PowerMac suspend code comes last */ |
3560 | #ifdef CONFIG_PPC_PMAC | 3564 | #ifdef CONFIG_PPC_PMAC |
@@ -3567,7 +3571,8 @@ static int ohci1394_pci_suspend (struct pci_dev *pdev, pm_message_t state) | |||
3567 | pmac_call_feature(PMAC_FTR_1394_ENABLE, of_node, 0, 0); | 3571 | pmac_call_feature(PMAC_FTR_1394_ENABLE, of_node, 0, 0); |
3568 | } | 3572 | } |
3569 | #endif /* CONFIG_PPC_PMAC */ | 3573 | #endif /* CONFIG_PPC_PMAC */ |
3570 | return 0; | 3574 | out: |
3575 | return err; | ||
3571 | } | 3576 | } |
3572 | #endif /* CONFIG_PM */ | 3577 | #endif /* CONFIG_PM */ |
3573 | 3578 | ||