summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2010-07-02 03:13:43 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2010-07-02 03:13:43 +0000
commit17df78769e62888f697709e91fae01a5c354c560 (patch)
tree8258930e0858437535987e229e45757b9fb0fe34 /sys/dev/usb
parent6d99ced538a18cfb44f9fa76abd032b12114620d (diff)
fix a variety of uninit errors. ok and one correction deraadt
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/if_rum.c3
-rw-r--r--sys/dev/usb/if_wi_usb.c8
-rw-r--r--sys/dev/usb/uvisor.c4
3 files changed, 8 insertions, 7 deletions
diff --git a/sys/dev/usb/if_rum.c b/sys/dev/usb/if_rum.c
index 6b8e018c6a4..ff7362bf973 100644
--- a/sys/dev/usb/if_rum.c
+++ b/sys/dev/usb/if_rum.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_rum.c,v 1.88 2010/04/20 22:05:43 tedu Exp $ */
+/* $OpenBSD: if_rum.c,v 1.89 2010/07/02 03:13:42 tedu Exp $ */
/*-
* Copyright (c) 2005-2007 Damien Bergamini <damien.bergamini@free.fr>
@@ -1991,6 +1991,7 @@ rum_init(struct ifnet *ifp)
if (ntries == 1000) {
printf("%s: timeout waiting for BBP/RF to wakeup\n",
sc->sc_dev.dv_xname);
+ error = ENODEV;
goto fail;
}
diff --git a/sys/dev/usb/if_wi_usb.c b/sys/dev/usb/if_wi_usb.c
index 11cc4cced0d..ba2834948e2 100644
--- a/sys/dev/usb/if_wi_usb.c
+++ b/sys/dev/usb/if_wi_usb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_wi_usb.c,v 1.46 2009/10/13 19:33:17 pirofti Exp $ */
+/* $OpenBSD: if_wi_usb.c,v 1.47 2010/07/02 03:13:42 tedu Exp $ */
/*
* Copyright (c) 2003 Dale Rahn. All rights reserved.
@@ -459,7 +459,7 @@ wi_usb_detach(struct device *self, int flags)
sc->wi_usb_ep[WI_USB_ENDPT_INTR] = NULL;
}
if (sc->wi_usb_ep[WI_USB_ENDPT_TX] != NULL) {
- usbd_abort_pipe(sc->wi_usb_ep[WI_USB_ENDPT_TX]);
+ err = usbd_abort_pipe(sc->wi_usb_ep[WI_USB_ENDPT_TX]);
if (err) {
printf("%s: abort tx pipe failed: %s\n",
sc->wi_usb_dev.dv_xname, usbd_errstr(err));
@@ -472,7 +472,7 @@ wi_usb_detach(struct device *self, int flags)
sc->wi_usb_ep[WI_USB_ENDPT_TX] = NULL;
}
if (sc->wi_usb_ep[WI_USB_ENDPT_RX] != NULL) {
- usbd_abort_pipe(sc->wi_usb_ep[WI_USB_ENDPT_RX]);
+ err = usbd_abort_pipe(sc->wi_usb_ep[WI_USB_ENDPT_RX]);
if (err) {
printf("%s: abort rx pipe failed: %s\n",
sc->wi_usb_dev.dv_xname, usbd_errstr(err));
@@ -657,7 +657,7 @@ wi_read_record_usb(struct wi_softc *wsc, struct wi_ltv_gen *ltv)
struct wi_rridreq *prid;
int total_len, rnd_len;
int err;
- struct wi_ltv_gen *oltv, p2ltv;
+ struct wi_ltv_gen *oltv = NULL, p2ltv;
DPRINTFN(5,("%s: %s: enter rid=%x\n",
sc->wi_usb_dev.dv_xname, __func__, ltv->wi_type));
diff --git a/sys/dev/usb/uvisor.c b/sys/dev/usb/uvisor.c
index 21dc17cf782..7776fae58fb 100644
--- a/sys/dev/usb/uvisor.c
+++ b/sys/dev/usb/uvisor.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvisor.c,v 1.39 2009/10/13 19:33:19 pirofti Exp $ */
+/* $OpenBSD: uvisor.c,v 1.40 2010/07/02 03:13:42 tedu Exp $ */
/* $NetBSD: uvisor.c,v 1.21 2003/08/03 21:59:26 nathanw Exp $ */
/*
@@ -425,7 +425,7 @@ usbd_status
uvisor_init(struct uvisor_softc *sc, struct uvisor_connection_info *ci,
struct uvisor_palm_connection_info *cpi)
{
- usbd_status err;
+ usbd_status err = 0;
usb_device_request_t req;
int actlen;
uWord avail;