diff options
author | Marcus Glocker <mglocker@cvs.openbsd.org> | 2020-07-31 10:49:34 +0000 |
---|---|---|
committer | Marcus Glocker <mglocker@cvs.openbsd.org> | 2020-07-31 10:49:34 +0000 |
commit | 988e4435cb386091d98bc3f6e2a43ae3d49c31cc (patch) | |
tree | e93687d2c7dbfce91c3730840b1dff9623e1f1d0 /sys/dev/usb/usb_subr.c | |
parent | 29fbdf272cf7167bceff6cbfb042a1a74375df01 (diff) |
Nuke all occurrences of usbd_abort_pipe() if it gets called right
before usbd_close_pipe(), since usbd_close_pipe() already takes care
about aborting non-empty pipes.
As investigated by gerhard@ usbdi.c rev. 1.57 did add usbd_abort_pipe()
to usbd_close_pipe(), but the drivers didn't get cleaned up afterwards.
ok gerhard@
Diffstat (limited to 'sys/dev/usb/usb_subr.c')
-rw-r--r-- | sys/dev/usb/usb_subr.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/dev/usb/usb_subr.c b/sys/dev/usb/usb_subr.c index 8cfe7ab8b63..3eb10ae4d16 100644 --- a/sys/dev/usb/usb_subr.c +++ b/sys/dev/usb/usb_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: usb_subr.c,v 1.150 2019/10/06 17:11:51 mpi Exp $ */ +/* $OpenBSD: usb_subr.c,v 1.151 2020/07/31 10:49:33 mglocker Exp $ */ /* $NetBSD: usb_subr.c,v 1.103 2003/01/10 11:19:13 augustss Exp $ */ /* $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $ */ @@ -1403,10 +1403,8 @@ usb_free_device(struct usbd_device *dev) DPRINTF(("%s: %p\n", __func__, dev)); - if (dev->default_pipe != NULL) { - usbd_abort_pipe(dev->default_pipe); + if (dev->default_pipe != NULL) usbd_close_pipe(dev->default_pipe); - } if (dev->ifaces != NULL) { nifc = dev->cdesc->bNumInterface; for (ifcidx = 0; ifcidx < nifc; ifcidx++) |