summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorthompsa <thompsa@FreeBSD.org>2009-01-19 21:22:10 +0000
committerthompsa <thompsa@FreeBSD.org>2009-01-19 21:22:10 +0000
commitf91eeb6c9ece6f8795d51f17b6f87c07300ee99a (patch)
tree8ee178ec7cb423a9c16df72265b559d33d55233c /sys/dev/usb
parent5996b0057b216ab7cfc1cee81b75427cd643743d (diff)
downloadFreeBSD-src-f91eeb6c9ece6f8795d51f17b6f87c07300ee99a.zip
FreeBSD-src-f91eeb6c9ece6f8795d51f17b6f87c07300ee99a.tar.gz
Set the pipe pointer before calling usbd_transfer() as its possible for the
xfer callback to be invoked on error. MFC after: 2 weeks
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/usbdi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/usb/usbdi.c b/sys/dev/usb/usbdi.c
index 8f0ce0f..a733bbf 100644
--- a/sys/dev/usb/usbdi.c
+++ b/sys/dev/usb/usbdi.c
@@ -237,8 +237,8 @@ usbd_open_pipe_intr(usbd_interface_handle iface, u_int8_t address,
USBD_NO_TIMEOUT, cb);
ipipe->intrxfer = xfer;
ipipe->repeat = 1;
- err = usbd_transfer(xfer);
*pipe = ipipe;
+ err = usbd_transfer(xfer);
if (err != USBD_IN_PROGRESS && err)
goto bad2;
return (USBD_NORMAL_COMPLETION);
OpenPOWER on IntegriCloud