Add missing NULL pointer check.

Reported by:	Lars Engels
MFC after:	1 week
This commit is contained in:
Hans Petter Selasky 2013-01-30 07:48:43 +00:00
parent c9b4e98754
commit 250fb892d3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=246113

View File

@ -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 ||