diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2009-02-03 19:57:22 -0500 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-02-04 20:20:39 -0500 |
commit | 144a76bc885ef4852601c66595326e59f12877f8 (patch) | |
tree | 87492fce6e91304467c7e2c9407b6795a80ba983 /drivers/pci | |
parent | ddb7c9d29fac34626aef2af9f19787a888e4ca9c (diff) |
PCI PM: Check if the state has been saved before trying to restore it
Check if the standard configuration registers of a PCI device have
been saved during suspend before trying to restore them during
resume.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Reported-By: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/pci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 48807556b47a..87c904233bf5 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -1421,7 +1421,7 @@ int pci_restore_standard_config(struct pci_dev *dev) | |||
1421 | dev->current_state = PCI_D0; | 1421 | dev->current_state = PCI_D0; |
1422 | 1422 | ||
1423 | Restore: | 1423 | Restore: |
1424 | return pci_restore_state(dev); | 1424 | return dev->state_saved ? pci_restore_state(dev) : 0; |
1425 | } | 1425 | } |
1426 | 1426 | ||
1427 | /** | 1427 | /** |