Set the pipe pointer before calling usbd_transfer() as its possible for the

xfer callback to be invoked on error.

MFC after:	2 weeks
This commit is contained in:
Andrew Thompson 2009-01-19 21:22:10 +00:00
parent 8e097e5b32
commit 70e1b678ee
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=187447

View File

@ -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);