Skip to contentSkip to conversation

megasas: remove useless check for cmd->frame

PATCH New Paolo Bonzini 1 participant 1 message Jul 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 hw/scsi/megasas.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
hw/scsi/megasas.c +1 -5
index 52a4123..e968302 100644
@@ -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);
     }
Signature · 1 line
2.7.4