From 40197c359b1f06cbaae5460336bca241c35f266e Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Mon, 22 Aug 2011 14:18:21 +0200 Subject: [PATCH] usb-host: reapurb error report fix Don't report errors on devices which are in disconnected and closing state. --- usb-linux.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/usb-linux.c b/usb-linux.c index 4e4df61c9f..12e8772a4f 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; }