summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2015-04-14 07:57:34 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2015-04-14 07:57:34 +0000
commit95971d44eba3e4ea9db68796eac3e0726ce0bf49 (patch)
tree47585aa6d96889e2e5bc73421317fcb4d324db98
parent068b7a6203f943caafc09db2fbb9596b9f6528b8 (diff)
Make sure we close the interrupt pipe when the device is detached.
Bug reported and fix tested by Thomas Pfaff, thanks!
-rw-r--r--sys/dev/usb/uchcom.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/sys/dev/usb/uchcom.c b/sys/dev/usb/uchcom.c
index 127e13de1da..7320f537403 100644
--- a/sys/dev/usb/uchcom.c
+++ b/sys/dev/usb/uchcom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uchcom.c,v 1.23 2015/03/14 03:38:49 jsg Exp $ */
+/* $OpenBSD: uchcom.c,v 1.24 2015/04/14 07:57:33 mpi Exp $ */
/* $NetBSD: uchcom.c,v 1.1 2007/09/03 17:57:37 tshiozak Exp $ */
/*
@@ -814,9 +814,6 @@ uchcom_close_intr_pipe(struct uchcom_softc *sc)
{
usbd_status err;
- if (usbd_is_dying(sc->sc_udev))
- return;
-
if (sc->sc_intr_pipe != NULL) {
usbd_abort_pipe(sc->sc_intr_pipe);
err = usbd_close_pipe(sc->sc_intr_pipe);
@@ -912,9 +909,6 @@ uchcom_close(void *arg, int portno)
{
struct uchcom_softc *sc = arg;
- if (usbd_is_dying(sc->sc_udev))
- return;
-
uchcom_close_intr_pipe(sc);
}