mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-05 14:14:54 +00:00
scsi: pm80xx: Corrected dma_unmap_sg() parameter
For the function dma_unmap_sg(), the <nents> parameter should be number of elements in the scatter list prior to the mapping, not after the mapping. Signed-off-by: Deepak Ukey <deepak.ukey@microchip.com> Signed-off-by: Viswas G <Viswas.G@microchip.com> Acked-by: Jack Wang <jinpu.wang@profitbricks.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
cd135754d8
commit
76cb25b058
1 changed files with 1 additions and 1 deletions
|
@ -488,7 +488,7 @@ err_out:
|
|||
dev_printk(KERN_ERR, pm8001_ha->dev, "pm8001 exec failed[%d]!\n", rc);
|
||||
if (!sas_protocol_ata(t->task_proto))
|
||||
if (n_elem)
|
||||
dma_unmap_sg(pm8001_ha->dev, t->scatter, n_elem,
|
||||
dma_unmap_sg(pm8001_ha->dev, t->scatter, t->num_scatter,
|
||||
t->data_dir);
|
||||
out_done:
|
||||
spin_unlock_irqrestore(&pm8001_ha->lock, flags);
|
||||
|
|
Loading…
Add table
Reference in a new issue