diff options
author | hselasky <hselasky@FreeBSD.org> | 2013-01-30 07:48:43 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2013-01-30 07:48:43 +0000 |
commit | a8f5ab5ec0c353016a4c04091689a482bd182c7f (patch) | |
tree | 9e54b6726b3271d4ce9d992a07feaa0197887122 /sys/dev/usb/controller/xhci.c | |
parent | 6b8dd85cc6a6fb909199883b05cc590385133db1 (diff) | |
download | FreeBSD-src-a8f5ab5ec0c353016a4c04091689a482bd182c7f.zip FreeBSD-src-a8f5ab5ec0c353016a4c04091689a482bd182c7f.tar.gz |
Add missing NULL pointer check.
Reported by: Lars Engels
MFC after: 1 week
Diffstat (limited to 'sys/dev/usb/controller/xhci.c')
-rw-r--r-- | sys/dev/usb/controller/xhci.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/dev/usb/controller/xhci.c b/sys/dev/usb/controller/xhci.c index c62f781..2a06ea2 100644 --- a/sys/dev/usb/controller/xhci.c +++ b/sys/dev/usb/controller/xhci.c @@ -886,6 +886,12 @@ xhci_check_transfer(struct xhci_softc *sc, struct xhci_trb *trb) * a short packet also makes the transfer done */ if (td->remainder > 0) { + if (td->alt_next == NULL) { + DPRINTF("short TD has no " + "alternate next\n"); + xhci_generic_done(xfer); + break; + } DPRINTF("TD has short pkt\n"); if (xfer->flags_int.short_frames_ok || xfer->flags_int.isochronous_xfr || |