Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb Quiet some uninitialized variable warnings that ...



details:   https://anonhg.NetBSD.org/src/rev/31eff2aa7b88
branches:  trunk
changeset: 485902:31eff2aa7b88
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Mon May 08 18:28:46 2000 +0000

description:
Quiet some uninitialized variable warnings that do in fact look legitimate.

diffstat:

 sys/dev/usb/ohci.c |  11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diffs (33 lines):

diff -r cee591005d7c -r 31eff2aa7b88 sys/dev/usb/ohci.c
--- a/sys/dev/usb/ohci.c        Mon May 08 18:23:36 2000 +0000
+++ b/sys/dev/usb/ohci.c        Mon May 08 18:28:46 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ohci.c,v 1.89 2000/04/27 15:26:46 augustss Exp $       */
+/*     $NetBSD: ohci.c,v 1.90 2000/05/08 18:28:46 thorpej Exp $        */
 /*     $FreeBSD: src/sys/dev/usb/ohci.c,v 1.22 1999/11/17 22:33:40 n_hibma Exp $       */
 
 /*
@@ -1889,6 +1889,9 @@
        DPRINTFN(1, ("ohci_open: pipe=%p, addr=%d, endpt=%d (%d)\n",
                     pipe, addr, ed->bEndpointAddress, sc->sc_addr));
 
+       std = NULL;
+       sed = NULL;
+
        if (addr == sc->sc_addr) {
                switch (ed->bEndpointAddress) {
                case USB_CONTROL_ENDPOINT:
@@ -1967,9 +1970,11 @@
        return (USBD_NORMAL_COMPLETION);
 
  bad:
-       ohci_free_std(sc, std);
+       if (std != NULL)
+               ohci_free_std(sc, std);
  bad1:
-       ohci_free_sed(sc, sed);
+       if (sed != NULL)
+               ohci_free_sed(sc, sed);
  bad0:
        return (USBD_NOMEM);
        



Home | Main Index | Thread Index | Old Index