host-libusb: Correct test for USB packet state

USB_RET_ASYNC is -6, so inflight was always false.

Signed-off-by: Ed Maste <emaste@freebsd.org>
Cc: qemu-stable@nongnu.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
Ed Maste 2013-05-07 10:06:12 -04:00 committed by Gerd Hoffmann
parent 756335292f
commit 45ec267160

View File

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