diff options
-rw-r--r-- | sys/i386/apm/apm.c | 3 | ||||
-rw-r--r-- | sys/i386/bios/apm.c | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/sys/i386/apm/apm.c b/sys/i386/apm/apm.c index 85d8eed..620da58 100644 --- a/sys/i386/apm/apm.c +++ b/sys/i386/apm/apm.c @@ -581,6 +581,9 @@ apm_suspend(int state) { struct apm_softc *sc = &apm_softc; + if (!sc->initialized) + return; + switch (state) { case PMST_SUSPEND: if (sc->suspends) diff --git a/sys/i386/bios/apm.c b/sys/i386/bios/apm.c index 85d8eed..620da58 100644 --- a/sys/i386/bios/apm.c +++ b/sys/i386/bios/apm.c @@ -581,6 +581,9 @@ apm_suspend(int state) { struct apm_softc *sc = &apm_softc; + if (!sc->initialized) + return; + switch (state) { case PMST_SUSPEND: if (sc->suspends) |