]> xenbits.xensource.com Git - qemu-xen-unstable.git/commitdiff
usb-host: reapurb error report fix
authorGerd Hoffmann <kraxel@redhat.com>
Mon, 22 Aug 2011 12:18:21 +0000 (14:18 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 7 Sep 2011 07:50:49 +0000 (09:50 +0200)
Don't report errors on devices which are in disconnected
and closing state.

usb-linux.c

index 4e4df61c9f95384df24f7175ec36a81e4b44baa9..12e8772a4f8b5ba3478636b38813544a91f16343 100644 (file)
@@ -312,9 +312,11 @@ static void async_complete(void *opaque)
                 }
                 return;
             }
-            if (errno == ENODEV && !s->closing) {
-                trace_usb_host_disconnect(s->bus_num, s->addr);
-                do_disconnect(s);
+            if (errno == ENODEV) {
+                if (!s->closing) {
+                    trace_usb_host_disconnect(s->bus_num, s->addr);
+                    do_disconnect(s);
+                }
                 return;
             }