Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/jbarnes/pci-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
  PCI: check saved state before restore
  • Loading branch information
Linus Torvalds committed Aug 22, 2009
2 parents e3054ea + c82f63e commit 3edf2fb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pci/pci-driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ static int pci_restore_standard_config(struct pci_dev *pci_dev)
return error;
}

return pci_dev->state_saved ? pci_restore_state(pci_dev) : 0;
return pci_restore_state(pci_dev);
}

static void pci_pm_default_resume_noirq(struct pci_dev *pci_dev)
Expand Down
2 changes: 2 additions & 0 deletions drivers/pci/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -846,6 +846,8 @@ pci_restore_state(struct pci_dev *dev)
int i;
u32 val;

if (!dev->state_saved)
return 0;
/* PCI Express register must be restored first */
pci_restore_pcie_state(dev);

Expand Down

0 comments on commit 3edf2fb

Please sign in to comment.