Fix a logic error when use PCIY_PMG capability

Reviewed by:	yongari
This commit is contained in:
Kevin Lo 2012-06-07 02:24:27 +00:00
parent f61ac9d9bd
commit 144a072499
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=236700

View File

@ -1661,7 +1661,7 @@ jme_resume(device_t dev)
sc = device_get_softc(dev);
JME_LOCK(sc);
if (pci_find_cap(sc->jme_dev, PCIY_PMG, &pmc) != 0) {
if (pci_find_cap(sc->jme_dev, PCIY_PMG, &pmc) == 0) {
pmstat = pci_read_config(sc->jme_dev,
pmc + PCIR_POWER_STATUS, 2);
/* Disable PME clear PME status. */