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 Index: linux/drivers/ieee1394/ohci1394.c =================================================================== --- linux.orig/drivers/ieee1394/ohci1394.c 2006-09-07 22:58:27.000000000 +0200 +++ linux/drivers/ieee1394/ohci1394.c 2006-09-07 23:07:42.000000000 +0200 @@ -3549,15 +3549,19 @@ static int ohci1394_pci_resume (struct p 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 @@ -3570,7 +3574,8 @@ static int ohci1394_pci_suspend (struct pmac_call_feature(PMAC_FTR_1394_ENABLE, of_node, 0, 0); } #endif /* CONFIG_PPC_PMAC */ - return 0; +out: + return err; } #endif /* CONFIG_PM */