Skip to content

Commit

Permalink
megasas: remove useless check for cmd->frame
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
bonzini committed Jul 17, 2016
1 parent 8bff06a commit 8cc4678
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions hw/scsi/megasas.c
Expand Up @@ -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);
}
Expand Down

0 comments on commit 8cc4678

Please sign in to comment.