diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c
index fb9a1124..a83ee0b 100644
--- a/drivers/pci/bus.c
+++ b/drivers/pci/bus.c
@@ -140,10 +140,11 @@
 void pci_enable_bridges(struct pci_bus *bus)
 {
 	struct pci_dev *dev;
+	int retval;
 
 	list_for_each_entry(dev, &bus->devices, bus_list) {
 		if (dev->subordinate) {
-			pci_enable_device(dev);
+			retval = pci_enable_device(dev);
 			pci_set_master(dev);
 			pci_enable_bridges(dev->subordinate);
 		}
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index 414c772..0d0d533 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -272,17 +272,19 @@
 }
 
 
-/* 
+/*
  * Default resume method for devices that have no driver provided resume,
  * or not even a driver at all.
  */
 static void pci_default_resume(struct pci_dev *pci_dev)
 {
+	int retval;
+
 	/* restore the PCI config space */
 	pci_restore_state(pci_dev);
 	/* if the device was enabled before suspend, reenable */
 	if (pci_dev->is_enabled)
-		pci_enable_device(pci_dev);
+		retval = pci_enable_device(pci_dev);
 	/* if the device was busmaster before the suspend, make it busmaster again */
 	if (pci_dev->is_busmaster)
 		pci_set_master(pci_dev);
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 93ec158..afee2de 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -444,8 +444,11 @@
 {
 	int err;
 
-	pci_set_power_state(dev, PCI_D0);
-	if ((err = pcibios_enable_device(dev, bars)) < 0)
+	err = pci_set_power_state(dev, PCI_D0);
+	if (err)
+		return err;
+	err = pcibios_enable_device(dev, bars);
+	if (err < 0)
 		return err;
 	return 0;
 }
diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c
index 30bac7e..3c565ce 100644
--- a/drivers/pci/pcie/portdrv_pci.c
+++ b/drivers/pci/pcie/portdrv_pci.c
@@ -90,15 +90,19 @@
 		pci_save_msi_state(dev);
 }
 
-static void pcie_portdrv_restore_config(struct pci_dev *dev)
+static int pcie_portdrv_restore_config(struct pci_dev *dev)
 {
 	struct pcie_port_device_ext *p_ext = pci_get_drvdata(dev);
+	int retval;
 
 	pci_restore_state(dev);
 	if (p_ext->interrupt_mode == PCIE_PORT_MSI_MODE)
 		pci_restore_msi_state(dev);
-	pci_enable_device(dev);
+	retval = pci_enable_device(dev);
+	if (retval)
+		return retval;
 	pci_set_master(dev);
+	return 0;
 }
 
 /*
diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c
index 7b9e54c..cbb451d 100644
--- a/drivers/usb/core/hcd-pci.c
+++ b/drivers/usb/core/hcd-pci.c
@@ -260,8 +260,10 @@
 		retval = pci_set_power_state (dev, PCI_D3hot);
 		if (retval == 0) {
 			dev_dbg (hcd->self.controller, "--> PCI D3\n");
-			pci_enable_wake (dev, PCI_D3hot, hcd->remote_wakeup);
-			pci_enable_wake (dev, PCI_D3cold, hcd->remote_wakeup);
+			retval = pci_enable_wake (dev, PCI_D3hot, hcd->remote_wakeup);
+			if (retval)
+				break;
+			retval = pci_enable_wake (dev, PCI_D3cold, hcd->remote_wakeup);
 		} else if (retval < 0) {
 			dev_dbg (&dev->dev, "PCI D3 suspend fail, %d\n",
 					retval);
@@ -335,8 +337,20 @@
 				dev->current_state);
 		}
 #endif
-		pci_enable_wake (dev, dev->current_state, 0);
-		pci_enable_wake (dev, PCI_D3cold, 0);
+		retval = pci_enable_wake (dev, dev->current_state, 0);
+		if (retval) {
+			dev_err(hcd->self.controller,
+				"can't enable_wake to %d, %d!\n",
+				dev->current_state, retval);
+			return retval;
+		}
+		retval = pci_enable_wake (dev, PCI_D3cold, 0);
+		if (retval) {
+			dev_err(hcd->self.controller,
+				"can't enable_wake to %d, %d!\n",
+				PCI_D3cold, retval);
+			return retval;
+		}
 	} else {
 		/* Same basic cases: clean (powered/not), dirty */
 		dev_dbg(hcd->self.controller, "PCI legacy resume\n");
@@ -376,7 +390,7 @@
 		usb_hc_died (hcd);
 	}
 
-	pci_enable_device(dev);
+	retval = pci_enable_device(dev);
 	return retval;
 }
 EXPORT_SYMBOL (usb_hcd_pci_resume);
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 149b13f..2507e89 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -549,7 +549,9 @@
 		hcd->can_wakeup = (port_wake & 1) != 0;
 
 		/* help hc dma work well with cachelines */
-		pci_set_mwi (pdev);
+		retval = pci_set_mwi(pdev);
+		if (retval)
+			ehci_dbg(ehci, "unable to enable MWI - not fatal.\n");
 	}
 #endif
 
