Skip to content

Commit

Permalink
[SCSI] qla2xxx: Remove redundant call to pci_unmap_sg().
Browse files Browse the repository at this point in the history
In a corner-case failure where the request-q does not
contain enough entries for a given request, pci_unmap_sg()
would be called twice.  Remove direct call and let the
failure-path logic handle the unmapping.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
  • Loading branch information
Andrew Vasquez authored and James Bottomley committed Sep 5, 2005
1 parent c32c4cb commit 131736d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions drivers/scsi/qla2xxx/qla_iocb.c
Original file line number Diff line number Diff line change
Expand Up @@ -810,12 +810,8 @@ qla24xx_start_scsi(srb_t *sp)
ha->req_q_cnt = ha->request_q_length -
(ha->req_ring_index - cnt);
}
if (ha->req_q_cnt < (req_cnt + 2)) {
if (cmd->use_sg)
pci_unmap_sg(ha->pdev, sg, cmd->use_sg,
cmd->sc_data_direction);
if (ha->req_q_cnt < (req_cnt + 2))
goto queuing_error;
}

/* Build command packet. */
ha->current_outstanding_cmd = handle;
Expand Down

0 comments on commit 131736d

Please sign in to comment.