Commit a1cbfd55 authored by Markus Armbruster's avatar Markus Armbruster Committed by Anthony Liguori
Browse files

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: default avatarMarkus Armbruster <>
Signed-off-by: default avatarAnthony Liguori <>
parent 955d7b26
...@@ -427,7 +427,7 @@ static void usb_msd_handle_data(USBDevice *dev, USBPacket *p) ...@@ -427,7 +427,7 @@ static void usb_msd_handle_data(USBDevice *dev, USBPacket *p)
scsi_req_print(s->req); scsi_req_print(s->req);
#endif #endif
scsi_req_enqueue(s->req); 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); scsi_req_continue(s->req);
} }
break; break;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment