summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2015-04-16 14:23:49 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2015-04-16 14:23:49 +0000
commitc6269d53afe5b1aaa7ede09548dacc1d2a4ca144 (patch)
tree63b57076bb3c450a00aada3d3b672bd5ec283e84 /sys
parente43f93840e82de389709af2bbd5defef79f83c94 (diff)
Make sure LLVM static analyzer do not report a false positive,
found by and fix confirmed by jsg@.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/usb/ehci.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/dev/usb/ehci.c b/sys/dev/usb/ehci.c
index 63e10004158..b21bb200b79 100644
--- a/sys/dev/usb/ehci.c
+++ b/sys/dev/usb/ehci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ehci.c,v 1.184 2015/04/10 15:33:20 mpi Exp $ */
+/* $OpenBSD: ehci.c,v 1.185 2015/04/16 14:23:48 mpi Exp $ */
/* $NetBSD: ehci.c,v 1.66 2004/06/30 03:11:56 mycroft Exp $ */
/*
@@ -3392,7 +3392,7 @@ ehci_alloc_itd_chain(struct ehci_softc *sc, struct usbd_xfer *xfer)
struct ehci_xfer *ex = (struct ehci_xfer *)xfer;
usb_endpoint_descriptor_t *ed = xfer->pipe->endpoint->edesc;
const uint32_t mps = UGETW(ed->wMaxPacketSize);
- struct ehci_soft_itd *itd, *pitd = NULL;
+ struct ehci_soft_itd *itd = NULL, *pitd = NULL;
int i, j, nframes, uframes, ufrperframe;
int offs = 0, trans_count = 0;
@@ -3505,7 +3505,6 @@ ehci_alloc_itd_chain(struct ehci_softc *sc, struct usbd_xfer *xfer)
pitd = itd;
}
- itd->xfer_next = NULL;
ex->itdend = itd;
return (0);
@@ -3517,7 +3516,7 @@ ehci_alloc_sitd_chain(struct ehci_softc *sc, struct usbd_xfer *xfer)
struct ehci_xfer *ex = (struct ehci_xfer *)xfer;
struct usbd_device *hshub = xfer->device->myhsport->parent;
usb_endpoint_descriptor_t *ed = xfer->pipe->endpoint->edesc;
- struct ehci_soft_itd *itd, *pitd = NULL;
+ struct ehci_soft_itd *itd = NULL, *pitd = NULL;
uint8_t smask, cmask, tp, uf;
int i, nframes, offs = 0;
uint32_t endp;
@@ -3588,7 +3587,6 @@ ehci_alloc_sitd_chain(struct ehci_softc *sc, struct usbd_xfer *xfer)
pitd = itd;
}
- itd->xfer_next = NULL;
ex->itdend = itd;
return (0);