aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2020-11-05 14:41:11 +0100
committerGerd Hoffmann <kraxel@redhat.com>2020-11-16 09:11:21 +0100
commit22abfc96af0209fa58a7b9c13d60b2982db281c7 (patch)
treec2ad5f3533faa007ada1a85e21f0bdbbf7671d49
parentaf06a0265e31848d895c1bbe173f03607cdba532 (diff)
downloadqemu-22abfc96af0209fa58a7b9c13d60b2982db281c7.zip
qemu-22abfc96af0209fa58a7b9c13d60b2982db281c7.tar.gz
qemu-22abfc96af0209fa58a7b9c13d60b2982db281c7.tar.bz2
xhci: fix guest triggerable assert
We didn't start any work yet so we can just return at that point instead of asserting. Buglink: https://bugs.launchpad.net/qemu/+bug/1883732 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20201105134112.25119-6-kraxel@redhat.com
-rw-r--r--hw/usb/hcd-xhci.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
index 79ce5c4..d00bb01 100644
--- a/hw/usb/hcd-xhci.c
+++ b/hw/usb/hcd-xhci.c
@@ -1904,7 +1904,9 @@ static void xhci_kick_epctx(XHCIEPContext *epctx, unsigned int streamid)
streamid = 0;
xhci_set_ep_state(xhci, epctx, NULL, EP_RUNNING);
}
- assert(ring->dequeue != 0);
+ if (!ring->dequeue) {
+ return;
+ }
epctx->kick_active++;
while (1) {