summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/usb_device.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/usb/usb_device.c')
-rw-r--r--sys/dev/usb/usb_device.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/usb/usb_device.c b/sys/dev/usb/usb_device.c
index f497b12..8d4e573 100644
--- a/sys/dev/usb/usb_device.c
+++ b/sys/dev/usb/usb_device.c
@@ -305,16 +305,16 @@ usb2_init_pipe(struct usb2_device *udev, uint8_t iface_index,
(methods->pipe_init) (udev, edesc, pipe);
- /* check for invalid pipe */
- if (pipe->methods == NULL)
- return;
-
/* initialise USB pipe structure */
pipe->edesc = edesc;
pipe->iface_index = iface_index;
TAILQ_INIT(&pipe->pipe_q.head);
pipe->pipe_q.command = &usb2_pipe_start;
+ /* the pipe is not supported by the hardware */
+ if (pipe->methods == NULL)
+ return;
+
/* clear stall, if any */
if (methods->clear_stall != NULL) {
USB_BUS_LOCK(udev->bus);
OpenPOWER on IntegriCloud