usb: delete error_report() for usb-bot
PATCH 1/1 usb: delete error_report() for usb-bot
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 <[email protected]>
--- hw/usb/dev-storage.c | 1 - 1 file changed, 1 deletion(-)
hw/usb/dev-storage.c +0 -1
@@ -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);
Signature · 1 line
1.9.3
Quoted 4 lines · 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 deleteerror_reporthere. Whenscsi_device_find()return NULL, just goto fail.
If the hints is incorrect, I think you should change the hint message, but not delete it, because that's a recession.
Best regards,
-Gonglei
Quoted 20 lines
This patch fixes following bug.
https://bugzilla.redhat.com/show_bug.cgi?id=1164665Signed-off-by Jun Li <[email protected]>--- hw/usb/dev-storage.c | 1 - 1 file changed, 1 deletion(-)hw/usb/dev-storage.c +0
-1@@ -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);