diff options
author | 2013-08-08 09:37:02 +0000 | |
---|---|---|
committer | 2013-08-08 09:37:02 +0000 | |
commit | 1dbb2043654803abeb7b0ba5b4668812a1acf188 (patch) | |
tree | c926786e1f3631fc0718bff45c672fd504deccfd /sys/dev/usb/usbdi.c | |
parent | Insert new IPv4 addresses in only one place, no functional change. (diff) | |
download | wireguard-openbsd-1dbb2043654803abeb7b0ba5b4668812a1acf188.tar.xz wireguard-openbsd-1dbb2043654803abeb7b0ba5b4668812a1acf188.zip |
Use the same functions to abort and close the control pipe of a device
as for every other pipes instead of having another function calling the
host controller method.
Diffstat (limited to 'sys/dev/usb/usbdi.c')
-rw-r--r-- | sys/dev/usb/usbdi.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/usb/usbdi.c b/sys/dev/usb/usbdi.c index 1f7b9594236..c9db98f697d 100644 --- a/sys/dev/usb/usbdi.c +++ b/sys/dev/usb/usbdi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: usbdi.c,v 1.55 2013/04/26 14:19:25 mpi Exp $ */ +/* $OpenBSD: usbdi.c,v 1.56 2013/08/08 09:37:02 mpi Exp $ */ /* $NetBSD: usbdi.c,v 1.103 2002/09/27 15:37:38 provos Exp $ */ /* $FreeBSD: src/sys/dev/usb/usbdi.c,v 1.28 1999/11/17 22:33:49 n_hibma Exp $ */ @@ -277,7 +277,9 @@ usbd_close_pipe(struct usbd_pipe *pipe) return (USBD_NORMAL_COMPLETION); if (! SIMPLEQ_EMPTY(&pipe->queue)) return (USBD_PENDING_REQUESTS); - LIST_REMOVE(pipe, next); + /* Default pipes are never linked */ + if (pipe->iface != NULL) + LIST_REMOVE(pipe, next); pipe->endpoint->refcnt--; pipe->methods->close(pipe); if (pipe->intrxfer != NULL) |