From f52607ae1474f5e86f736d760011ec683a1c8a13 Mon Sep 17 00:00:00 2001 From: apb Date: Fri, 18 Oct 2013 08:25:49 +0000 Subject: 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. --- sys/dev/usb/xhci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/dev') 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 -__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 #include @@ -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; -- cgit