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.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index 93eac1423585..a5f11ad975b2 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -352,17 +352,17 @@ static int pci_legacy_suspend(struct device *dev, pm_message_t state)
352{ 352{
353 struct pci_dev * pci_dev = to_pci_dev(dev); 353 struct pci_dev * pci_dev = to_pci_dev(dev);
354 struct pci_driver * drv = pci_dev->driver; 354 struct pci_driver * drv = pci_dev->driver;
355 int i = 0; 355 int error = 0;
356 356
357 if (drv && drv->suspend) { 357 if (drv && drv->suspend) {
358 pci_power_t prev = pci_dev->current_state; 358 pci_power_t prev = pci_dev->current_state;
359 359
360 pci_dev->state_saved = false; 360 pci_dev->state_saved = false;
361 361
362 i = drv->suspend(pci_dev, state); 362 error = drv->suspend(pci_dev, state);
363 suspend_report_result(drv->suspend, i); 363 suspend_report_result(drv->suspend, error);
364 if (i) 364 if (error)
365 return i; 365 return error;
366 366
367 if (pci_dev->state_saved) 367 if (pci_dev->state_saved)
368 goto Fixup; 368 goto Fixup;
@@ -385,20 +385,20 @@ static int pci_legacy_suspend(struct device *dev, pm_message_t state)
385 Fixup: 385 Fixup:
386 pci_fixup_device(pci_fixup_suspend, pci_dev); 386 pci_fixup_device(pci_fixup_suspend, pci_dev);
387 387
388 return i; 388 return error;
389} 389}
390 390
391static int pci_legacy_suspend_late(struct device *dev, pm_message_t state) 391static int pci_legacy_suspend_late(struct device *dev, pm_message_t state)
392{ 392{
393 struct pci_dev * pci_dev = to_pci_dev(dev); 393 struct pci_dev * pci_dev = to_pci_dev(dev);
394 struct pci_driver * drv = pci_dev->driver; 394 struct pci_driver * drv = pci_dev->driver;
395 int i = 0; 395 int error = 0;
396 396
397 if (drv && drv->suspend_late) { 397 if (drv && drv->suspend_late) {
398 i = drv->suspend_late(pci_dev, state); 398 error = drv->suspend_late(pci_dev, state);
399 suspend_report_result(drv->suspend_late, i); 399 suspend_report_result(drv->suspend_late, error);
400 } 400 }
401 return i; 401 return error;
402} 402}
403 403
404static int pci_legacy_resume_early(struct device *dev) 404static int pci_legacy_resume_early(struct device *dev)