aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci-driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/pci-driver.c')
-rw-r--r--drivers/pci/pci-driver.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index 414c77299c7d..0d0d533894e0 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -272,17 +272,19 @@ static int pci_device_suspend(struct device * dev, pm_message_t state)
272} 272}
273 273
274 274
275/* 275/*
276 * Default resume method for devices that have no driver provided resume, 276 * Default resume method for devices that have no driver provided resume,
277 * or not even a driver at all. 277 * or not even a driver at all.
278 */ 278 */
279static void pci_default_resume(struct pci_dev *pci_dev) 279static void pci_default_resume(struct pci_dev *pci_dev)
280{ 280{
281 int retval;
282
281 /* restore the PCI config space */ 283 /* restore the PCI config space */
282 pci_restore_state(pci_dev); 284 pci_restore_state(pci_dev);
283 /* if the device was enabled before suspend, reenable */ 285 /* if the device was enabled before suspend, reenable */
284 if (pci_dev->is_enabled) 286 if (pci_dev->is_enabled)
285 pci_enable_device(pci_dev); 287 retval = pci_enable_device(pci_dev);
286 /* if the device was busmaster before the suspend, make it busmaster again */ 288 /* if the device was busmaster before the suspend, make it busmaster again */
287 if (pci_dev->is_busmaster) 289 if (pci_dev->is_busmaster)
288 pci_set_master(pci_dev); 290 pci_set_master(pci_dev);