From c2f17dbeade10e04e77759d51addc8798f1c6dba Mon Sep 17 00:00:00 2001 From: Stefan Sperling Date: Tue, 21 May 2019 09:20:41 +0000 Subject: Fix NULL check with wrong pointer in xhci_event_xfer_isoc(); CID 1480287 ok ratchov@ --- sys/dev/usb/xhci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/usb/xhci.c b/sys/dev/usb/xhci.c index 6bee1d5c097..375625096ab 100644 --- a/sys/dev/usb/xhci.c +++ b/sys/dev/usb/xhci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xhci.c,v 1.103 2019/04/30 20:09:12 ratchov Exp $ */ +/* $OpenBSD: xhci.c,v 1.104 2019/05/21 09:20:40 stsp Exp $ */ /* * Copyright (c) 2014-2015 Martin Pieuchot @@ -935,7 +935,7 @@ xhci_event_xfer_isoc(struct usbd_xfer *xfer, struct xhci_pipe *xp, if (xp->skip) { while (1) { skipxfer = SIMPLEQ_FIRST(&xp->pipe.queue); - if (skipxfer == xfer || xfer == NULL) + if (skipxfer == xfer || skipxfer == NULL) break; DPRINTF(("%s: skipping %p\n", __func__, skipxfer)); skipxfer->status = USBD_NORMAL_COMPLETION; -- cgit v1.2.3