From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41196) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XqFCF-0006g1-7g for qemu-devel@nongnu.org; Mon, 17 Nov 2014 00:50:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XqFC6-0007yn-5t for qemu-devel@nongnu.org; Mon, 17 Nov 2014 00:49:55 -0500 Received: from mail-pa0-x22b.google.com ([2607:f8b0:400e:c03::22b]:51391) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XqFC5-0007yi-Td for qemu-devel@nongnu.org; Mon, 17 Nov 2014 00:49:46 -0500 Received: by mail-pa0-f43.google.com with SMTP id kx10so1326676pab.30 for ; Sun, 16 Nov 2014 21:49:44 -0800 (PST) From: Jun Li Date: Mon, 17 Nov 2014 13:49:35 +0800 Message-Id: <1416203375-8185-1-git-send-email-junmuzi@gmail.com> Subject: [Qemu-devel] [PATCH] usb: delete error_report() for usb-bot List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: famz@redhat.com, juli@redhat.com, kraxel@redhat.com, Jun Li When no device under usb-bot bus, usb_msd_handle_data() will print "usb-msd: Bad LUN 0". This is not correct hints. So delete error_report here. When scsi_device_find() return NULL, just goto fail. This patch fixes following bug. https://bugzilla.redhat.com/show_bug.cgi?id=1164665 Signed-off-by: Jun Li --- hw/usb/dev-storage.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c index 4539733..f386d62 100644 --- a/hw/usb/dev-storage.c +++ b/hw/usb/dev-storage.c @@ -424,7 +424,6 @@ static void usb_msd_handle_data(USBDevice *dev, USBPacket *p) DPRINTF("Command on LUN %d\n", cbw.lun); scsi_dev = scsi_device_find(&s->bus, 0, 0, cbw.lun); if (scsi_dev == NULL) { - error_report("usb-msd: Bad LUN %d", cbw.lun); goto fail; } tag = le32_to_cpu(cbw.tag); -- 1.9.3