scsi-bus: Don't mask rc of scsi_req_parse_cdb
PATCH 1/1 scsi-bus: Don't mask rc of scsi_req_parse_cdb
If the previous call failed, we can skip the second one.
Signed-off-by Fam Zheng <[email protected]>
--- hw/scsi/scsi-bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/scsi/scsi-bus.c +1 -1
@@ -67,7 +67,7 @@ int scsi_bus_parse_cdb(SCSIDevice *dev, SCSICommand *cmd, uint8_t *buf,assert (cmd->len ==0 ); rc =scsi_req_parse_cdb (dev, cmd, buf); -if (bus->info->parse_cdb) { +if (!rc && bus->info->parse_cdb) { rc = bus->info->parse_cdb (dev, cmd, buf, hba_private); }return rc;
Signature · 1 line
1.9.3