diff options
author | Markus Armbruster <armbru@redhat.com> | 2013-01-16 18:20:25 +0100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2013-01-16 12:03:15 -0600 |
commit | a1cbfd554e11bb8af38c2f3e1f1574bf4c563cd2 (patch) | |
tree | 8deb6383cacf6c30dbffa5702382aa7e8e4f1920 /hw/usb | |
parent | 955d7b26779d6654f6ba2c456bac9fd49fa0cd8a (diff) | |
download | qemu-a1cbfd554e11bb8af38c2f3e1f1574bf4c563cd2.zip qemu-a1cbfd554e11bb8af38c2f3e1f1574bf4c563cd2.tar.gz qemu-a1cbfd554e11bb8af38c2f3e1f1574bf4c563cd2.tar.bz2 |
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>
Diffstat (limited to 'hw/usb')
-rw-r--r-- | hw/usb/dev-storage.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c index 1b87352..b839798 100644 --- a/hw/usb/dev-storage.c +++ b/hw/usb/dev-storage.c @@ -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; |