提交 f4c0e501 编写于 作者: G Gerd Hoffmann

Revert "usb-storage: Drop useless null test in usb_msd_handle_data()"

This reverts commit a1cbfd55.

Test isn't useless.  scsi_req_enqueue() may finish the request (will
actually happen for requests which don't trigger any I/O such as
INQUIRY), then call usb_msd_command_complete() which in turn will
set s->req to NULL after unref'ing it.
Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
上级 1356b98d
......@@ -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->cmd.xfer != SCSI_XFER_NONE) {
if (s->req && s->req->cmd.xfer != SCSI_XFER_NONE) {
scsi_req_continue(s->req);
}
break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册