Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb Don't refer to uninitialised variable 'v'



details:   https://anonhg.NetBSD.org/src/rev/78c3ad9125a7
branches:  trunk
changeset: 790607:78c3ad9125a7
user:      apb <apb%NetBSD.org@localhost>
date:      Fri Oct 18 08:25:49 2013 +0000

description:
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:

 sys/dev/usb/xhci.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 91119d6a7613 -r 78c3ad9125a7 sys/dev/usb/xhci.c
--- a/sys/dev/usb/xhci.c        Fri Oct 18 08:09:37 2013 +0000
+++ b/sys/dev/usb/xhci.c        Fri Oct 18 08:25:49 2013 +0000
@@ -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 @@
                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;



Home | Main Index | Thread Index | Old Index