Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/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
This commit is contained in:
@@ -508,7 +508,7 @@ static int pci_restore_standard_config(struct pci_dev *pci_dev)
|
|||||||
return error;
|
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)
|
static void pci_pm_default_resume_noirq(struct pci_dev *pci_dev)
|
||||||
|
|||||||
@@ -846,6 +846,8 @@ pci_restore_state(struct pci_dev *dev)
|
|||||||
int i;
|
int i;
|
||||||
u32 val;
|
u32 val;
|
||||||
|
|
||||||
|
if (!dev->state_saved)
|
||||||
|
return 0;
|
||||||
/* PCI Express register must be restored first */
|
/* PCI Express register must be restored first */
|
||||||
pci_restore_pcie_state(dev);
|
pci_restore_pcie_state(dev);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user