[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] scsi-bus: Don't mask rc of scsi_req_parse_cdb
From: |
Fam Zheng |
Subject: |
[Qemu-devel] [PATCH] scsi-bus: Don't mask rc of scsi_req_parse_cdb |
Date: |
Thu, 30 Oct 2014 15:14:22 +0800 |
If the previous call failed, we can skip the second one.
Signed-off-by: Fam Zheng <address@hidden>
---
hw/scsi/scsi-bus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c
index af7707c..0661f70 100644
--- a/hw/scsi/scsi-bus.c
+++ b/hw/scsi/scsi-bus.c
@@ -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;
--
1.9.3
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [PATCH] scsi-bus: Don't mask rc of scsi_req_parse_cdb,
Fam Zheng <=