aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/pci/pci.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 17bd9325a245..f0aa3d533839 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -1393,12 +1393,11 @@ int pci_restore_standard_config(struct pci_dev *dev)
1393 pci_power_t prev_state; 1393 pci_power_t prev_state;
1394 int error; 1394 int error;
1395 1395
1396 pci_restore_state(dev);
1397 pci_update_current_state(dev, PCI_D0); 1396 pci_update_current_state(dev, PCI_D0);
1398 1397
1399 prev_state = dev->current_state; 1398 prev_state = dev->current_state;
1400 if (prev_state == PCI_D0) 1399 if (prev_state == PCI_D0)
1401 return 0; 1400 goto Restore;
1402 1401
1403 error = pci_raw_set_power_state(dev, PCI_D0, false); 1402 error = pci_raw_set_power_state(dev, PCI_D0, false);
1404 if (error) 1403 if (error)
@@ -1421,7 +1420,8 @@ int pci_restore_standard_config(struct pci_dev *dev)
1421 1420
1422 dev->current_state = PCI_D0; 1421 dev->current_state = PCI_D0;
1423 1422
1424 return 0; 1423 Restore:
1424 return pci_restore_state(dev);
1425} 1425}
1426 1426
1427/** 1427/**