summaryrefslogtreecommitdiff
path: root/sys/dev/usb/usb_device.c
diff options
context:
space:
mode:
authorAndrew Thompson <thompsa@FreeBSD.org>2009-10-29 23:17:23 +0000
committerAndrew Thompson <thompsa@FreeBSD.org>2009-10-29 23:17:23 +0000
commit9d168176f5a01adb51ed92d1c7ab0b131a7fb44d (patch)
tree1624332da51bb8095ba46ac67fc1e119ca9724b5 /sys/dev/usb/usb_device.c
parentf23c09d0b0ec175a424638a57c7a667c14e36cf4 (diff)
Notes
Diffstat (limited to 'sys/dev/usb/usb_device.c')
-rw-r--r--sys/dev/usb/usb_device.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/usb/usb_device.c b/sys/dev/usb/usb_device.c
index d286db08b481..ea864f4287db 100644
--- a/sys/dev/usb/usb_device.c
+++ b/sys/dev/usb/usb_device.c
@@ -367,12 +367,14 @@ usb_init_endpoint(struct usb_device *udev, uint8_t iface_index,
struct usb_endpoint *
usb_endpoint_foreach(struct usb_device *udev, struct usb_endpoint *ep)
{
- struct usb_endpoint *ep_end = udev->endpoints + udev->endpoints_max;
+ struct usb_endpoint *ep_end;
/* be NULL safe */
if (udev == NULL)
return (NULL);
+ ep_end = udev->endpoints + udev->endpoints_max;
+
/* get next endpoint */
if (ep == NULL)
ep = udev->endpoints;