From: Ed Maste Date: Tue, 7 May 2013 14:06:12 +0000 (-0400) Subject: host-libusb: Correct test for USB packet state X-Git-Tag: v1.6.0-rc0~258^2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=45ec267160307ce2ca7494d942589ba222b29479;p=thirdparty%2Fqemu.git host-libusb: Correct test for USB packet state USB_RET_ASYNC is -6, so inflight was always false. Signed-off-by: Ed Maste Cc: qemu-stable@nongnu.org Signed-off-by: Gerd Hoffmann --- diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c index f3de4591fd8..3a582c526dd 100644 --- a/hw/usb/host-libusb.c +++ b/hw/usb/host-libusb.c @@ -385,7 +385,7 @@ out: static void usb_host_req_abort(USBHostRequest *r) { USBHostDevice *s = r->host; - bool inflight = (r->p && r->p->state == USB_RET_ASYNC); + bool inflight = (r->p && r->p->state == USB_PACKET_ASYNC); if (inflight) { r->p->status = USB_RET_NODEV;