Skip to content

Commit

Permalink
[SCSI] qla4xxx: fix up residual handling
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Somayajulu authored and James Bottomley committed Feb 22, 2008
1 parent a8e14fe commit 65fecc7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/scsi/qla4xxx/ql4_isr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 65fecc7

Please sign in to comment.