From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:35122) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QzQUY-0000U9-Kz for qemu-devel@nongnu.org; Fri, 02 Sep 2011 05:56:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QzQUW-00029m-L5 for qemu-devel@nongnu.org; Fri, 02 Sep 2011 05:56:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39587) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QzQUW-00029Q-Aa for qemu-devel@nongnu.org; Fri, 02 Sep 2011 05:56:52 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p829upc6010876 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 2 Sep 2011 05:56:51 -0400 From: Gerd Hoffmann Date: Fri, 2 Sep 2011 11:56:31 +0200 Message-Id: <1314957407-29508-3-git-send-email-kraxel@redhat.com> In-Reply-To: <1314957407-29508-1-git-send-email-kraxel@redhat.com> References: <1314957407-29508-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 02/18] usb-host: reapurb error report fix List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann Don't report errors on devices which are in disconnected and closing state. --- usb-linux.c | 8 +++++--- 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; } -- 1.7.1