From: mpi Date: Tue, 14 Apr 2015 07:57:33 +0000 (+0000) Subject: Make sure we close the interrupt pipe when the device is detached. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=40d9cd0e08fa142930a52325629bc8283e81442b;p=openbsd Make sure we close the interrupt pipe when the device is detached. Bug reported and fix tested by Thomas Pfaff, thanks! --- 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); }