]> err.no Git - linux-2.6/commitdiff
[SCSI] qla2xxx: Remove redundant call to pci_unmap_sg().
authorAndrew Vasquez <andrew.vasquez@qlogic.com>
Sat, 27 Aug 2005 02:09:20 +0000 (19:09 -0700)
committerJames Bottomley <jejb@mulgrave.(none)>
Mon, 5 Sep 2005 00:53:28 +0000 (19:53 -0500)
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>
drivers/scsi/qla2xxx/qla_iocb.c

index ebdc3c54d155d0a35f6700f1b9e44651f0959015..37f82e2cd7fbd4e3db61587d8841e03d95645483 100644 (file)
@@ -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;