[SCSI] qla4xxx: fix up residual handling
authorDavid Somayajulu <david.somayajulu@qlogic.com>
Thu, 21 Feb 2008 11:43:00 +0000 (03:43 -0800)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Fri, 22 Feb 2008 23:14:12 +0000 (17:14 -0600)
the check in the residual case has an incorrect test of scsi_status
(the logic is reversed, it should be scsi_status != 0 instead of
!scsi_status.  Since we checked a few lines above that scsi_status was
non-zero, just eliminate this test

Signed-off-by: David C Somayajulu <david.somayajulu@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/qla4xxx/ql4_isr.c

index 0f029d0d73150e17881cec0f98575134d22438e8..fc84db4069f42d267d870b4deb56a763319312c0 100644 (file)
@@ -100,8 +100,7 @@ static void qla4xxx_status_entry(struct scsi_qla_host *ha,
 
                if (sts_entry->iscsiFlags &ISCSI_FLAG_RESIDUAL_UNDER) {
                        scsi_set_resid(cmd, residual);
-                       if (!scsi_status && ((scsi_bufflen(cmd) - residual) <
-                               cmd->underflow)) {
+                       if ((scsi_bufflen(cmd) - residual) < cmd->underflow) {
 
                                cmd->result = DID_ERROR << 16;