aboutsummaryrefslogtreecommitdiff
path: root/hw/scsi
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2016-07-15 18:42:53 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2016-07-17 09:59:21 +0200
commit8cc46787b5b58f01a11c919c7ff939ed009e27fc (patch)
treef9e173b8da248a93f90590e24b4147a5f1cb9311 /hw/scsi
parent8bff06a0bbf257a2083223534c1607bf87d913e6 (diff)
downloadqemu-8cc46787b5b58f01a11c919c7ff939ed009e27fc.zip
qemu-8cc46787b5b58f01a11c919c7ff939ed009e27fc.tar.gz
qemu-8cc46787b5b58f01a11c919c7ff939ed009e27fc.tar.bz2
megasas: remove useless check for cmd->frame
megasas_enqueue_frame always returns with non-NULL cmd->frame. Remove the "else" part as it is dead code. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/scsi')
-rw-r--r--hw/scsi/megasas.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c
index 52a4123..e968302 100644
--- a/hw/scsi/megasas.c
+++ b/hw/scsi/megasas.c
@@ -1981,11 +1981,7 @@ static void megasas_handle_frame(MegasasState *s, uint64_t frame_addr,
break;
}
if (frame_status != MFI_STAT_INVALID_STATUS) {
- if (cmd->frame) {
- cmd->frame->header.cmd_status = frame_status;
- } else {
- megasas_frame_set_cmd_status(s, frame_addr, frame_status);
- }
+ cmd->frame->header.cmd_status = frame_status;
megasas_unmap_frame(s, cmd);
megasas_complete_frame(s, cmd->context);
}