summaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2006-09-17 19:41:45 +0200
committerStefan Richter <stefanr@s5r6.in-berlin.de>2006-09-17 19:41:45 +0200
commitea6104c22468239083857fa07425c312b1ecb424 (patch)
treead34dd8e4cfb7f667de04f2ec89dd0db94f23427 /drivers/ieee1394
parentf0645e7720e0baacbde61d7d1f0180309451c695 (diff)
downloadtalos-obmc-linux-ea6104c22468239083857fa07425c312b1ecb424.tar.gz
talos-obmc-linux-ea6104c22468239083857fa07425c312b1ecb424.zip
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.c17
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)
pci_set_power_state(pdev, PCI_D0);
pci_restore_state(pdev);
- pci_enable_device(pdev);
-
- return 0;
+ return pci_enable_device(pdev);
}
static int ohci1394_pci_suspend (struct pci_dev *pdev, pm_message_t state)
{
- pci_save_state(pdev);
- pci_set_power_state(pdev, pci_choose_state(pdev, state));
+ int err;
+
+ err = pci_save_state(pdev);
+ if (err)
+ goto out;
+ err = pci_set_power_state(pdev, pci_choose_state(pdev, state));
+ if (err)
+ goto out;
/* PowerMac suspend code comes last */
#ifdef CONFIG_PPC_PMAC
@@ -3567,7 +3571,8 @@ static int ohci1394_pci_suspend (struct pci_dev *pdev, pm_message_t state)
pmac_call_feature(PMAC_FTR_1394_ENABLE, of_node, 0, 0);
}
#endif /* CONFIG_PPC_PMAC */
- return 0;
+out:
+ return err;
}
#endif /* CONFIG_PM */
OpenPOWER on IntegriCloud