usb-host: reapurb error report fix

Don't report errors on devices which are in disconnected
and closing state.
This commit is contained in:
Gerd Hoffmann 2011-08-22 14:18:21 +02:00
parent e6a2f50042
commit 40197c359b
1 changed files with 5 additions and 3 deletions

View 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;
}