usb-storage: Drop useless null test in usb_msd_handle_data()
scsi_req_new() never returns null, and scsi_req_enqueue() dereferences the pointer, so checking for null is useless. Spotted by Coverity. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
955d7b2677
commit
a1cbfd554e
@ -427,7 +427,7 @@ static void usb_msd_handle_data(USBDevice *dev, USBPacket *p)
|
||||
scsi_req_print(s->req);
|
||||
#endif
|
||||
scsi_req_enqueue(s->req);
|
||||
if (s->req && s->req->cmd.xfer != SCSI_XFER_NONE) {
|
||||
if (s->req->cmd.xfer != SCSI_XFER_NONE) {
|
||||
scsi_req_continue(s->req);
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user