summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2011-08-22 14:18:21 +0200
committerGerd Hoffmann <kraxel@redhat.com>2011-09-07 09:50:49 +0200
commit40197c359b1f06cbaae5460336bca241c35f266e (patch)
tree939a61909b566cf493ce3a2ed4e885283b5bb0a8
parente6a2f50042580796de2df38e7eb7a907f4305839 (diff)
downloadhqemu-40197c359b1f06cbaae5460336bca241c35f266e.zip
hqemu-40197c359b1f06cbaae5460336bca241c35f266e.tar.gz
usb-host: reapurb error report fix
Don't report errors on devices which are in disconnected and closing state.
-rw-r--r--usb-linux.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usb-linux.c b/usb-linux.c
index 4e4df61..12e8772 100644
--- a/usb-linux.c
+++ b/usb-linux.c
@@ -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;
}
OpenPOWER on IntegriCloud