From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:36940) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QwbWI-0004Da-DF for qemu-devel@nongnu.org; Thu, 25 Aug 2011 11:07:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QwbWH-0002Nl-Iw for qemu-devel@nongnu.org; Thu, 25 Aug 2011 11:07:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:20992) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QwbWH-0002NE-8R for qemu-devel@nongnu.org; Thu, 25 Aug 2011 11:07:01 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p7PF6xoA011452 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 25 Aug 2011 11:07:00 -0400 From: Gerd Hoffmann Date: Thu, 25 Aug 2011 17:06:52 +0200 Message-Id: <1314284817-9034-3-git-send-email-kraxel@redhat.com> In-Reply-To: <1314284817-9034-1-git-send-email-kraxel@redhat.com> References: <1314284817-9034-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 2/7] 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 d813a85..ddfa50a 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