summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorapb <apb@NetBSD.org>2013-10-18 08:25:49 +0000
committerapb <apb@NetBSD.org>2013-10-18 08:25:49 +0000
commitf52607ae1474f5e86f736d760011ec683a1c8a13 (patch)
treecb558086f2129609dfa8e96bfbb9a5f00eb79ec7 /sys/dev/usb
parentc3f9110d06bf5f11454f351114ed466b1a44bf8c (diff)
Don't refer to uninitialised variable 'v'
in case C(UR_GET_DESCRIPTOR, UT_READ_CLASS_DEVICE) in xhci_root_ctrl_start(). This code was apparently pasted from the ehci driver. OK nick.
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/xhci.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/usb/xhci.c b/sys/dev/usb/xhci.c
index 85b526b6293..e671a8ce646 100644
--- a/sys/dev/usb/xhci.c
+++ b/sys/dev/usb/xhci.c
@@ -1,4 +1,4 @@
-/* $NetBSD: xhci.c,v 1.1 2013/09/14 00:40:31 jakllsch Exp $ */
+/* $NetBSD: xhci.c,v 1.2 2013/10/18 08:25:49 apb Exp $ */
/*
* Copyright (c) 2013 Jonathan A. Kollasch
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.1 2013/09/14 00:40:31 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.2 2013/10/18 08:25:49 apb Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -2207,7 +2207,7 @@ xhci_root_ctrl_start(usbd_xfer_handle xfer)
hubd.bNbrPorts = sc->sc_hs_port_count;
USETW(hubd.wHubCharacteristics, UHD_PWR_NO_SWITCH);
hubd.bPwrOn2PwrGood = 200;
- for (i = 0, l = sc->sc_maxports; l > 0; i++, l -= 8, v >>= 8)
+ for (i = 0, l = sc->sc_maxports; l > 0; i++, l -= 8)
hubd.DeviceRemovable[i++] = 0; /* XXX can't find out? */ hubd.bDescLength = USB_HUB_DESCRIPTOR_SIZE + i;
l = min(len, hubd.bDescLength);
totlen = l;