diff mbox

[06/13] megasas: Fix typo in megasas_dcmd_ld_get_list()

Message ID 1414584016-25888-7-git-send-email-hare@suse.de
State New
Headers show

Commit Message

Hannes Reinecke Oct. 29, 2014, noon UTC
The check for a valid command buffer size was inverted.

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 hw/scsi/megasas.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c
index 190a0bd..6933b56 100644
--- a/hw/scsi/megasas.c
+++ b/hw/scsi/megasas.c
@@ -1118,7 +1118,7 @@  static int megasas_dcmd_ld_get_list(MegasasState *s, MegasasCmd *cmd)
     BusChild *kid;
 
     memset(&info, 0, dcmd_size);
-    if (cmd->iov_size < dcmd_size) {
+    if (cmd->iov_size > dcmd_size) {
         trace_megasas_dcmd_invalid_xfer_len(cmd->index, cmd->iov_size,
                                             dcmd_size);
         return MFI_STAT_INVALID_PARAMETER;