summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2006-05-22 15:26:08 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2006-05-22 15:26:08 +0000
commit5aaf8793f4103b4069f9de6f81cf686c78d4f1b1 (patch)
tree252722902d9bc05ba3e235aae43a9115db814e66 /sys
parent2ea10b8a6ab026f4622a8f60e52385f3611fe267 (diff)
Don't call shutdownhook_disestablish() unless there is a shutdownhook
established. Should fix PR #5128. ok dlg@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/usb/ohci.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c
index 9a98850b372..cabae65da4d 100644
--- a/sys/dev/usb/ohci.c
+++ b/sys/dev/usb/ohci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ohci.c,v 1.66 2006/05/04 14:21:30 jolan Exp $ */
+/* $OpenBSD: ohci.c,v 1.67 2006/05/22 15:26:07 krw Exp $ */
/* $NetBSD: ohci.c,v 1.139 2003/02/22 05:24:16 tsutsui Exp $ */
/* $FreeBSD: src/sys/dev/usb/ohci.c,v 1.22 1999/11/17 22:33:40 n_hibma Exp $ */
@@ -373,7 +373,8 @@ ohci_detach(struct ohci_softc *sc, int flags)
usb_uncallout(sc->sc_tmo_rhsc, ohci_rhsc_enable, sc);
#if defined(__NetBSD__) || defined(__OpenBSD__)
- shutdownhook_disestablish(sc->sc_shutdownhook);
+ if (sc->sc_shutdownhook != NULL)
+ shutdownhook_disestablish(sc->sc_shutdownhook);
#endif
usb_delay_ms(&sc->sc_bus, 300); /* XXX let stray task complete */