提交 144a76bc 编写于 作者: R Rafael J. Wysocki 提交者: Jesse Barnes

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: NRafael J. Wysocki <rjw@sisk.pl>
Reported-By: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: NLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
上级 ddb7c9d2
......@@ -1421,7 +1421,7 @@ int pci_restore_standard_config(struct pci_dev *dev)
dev->current_state = PCI_D0;
Restore:
return pci_restore_state(dev);
return dev->state_saved ? pci_restore_state(dev) : 0;
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册