mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 02:50:43 +00:00
[SCSI] qla2xxx: Remove redundant call to pci_unmap_sg().
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>
This commit is contained in:
parent
c32c4cb9fb
commit
131736d34e
1 changed files with 1 additions and 5 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue