mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 12:57:53 +00:00
PCI: epf-mhi: Fix the DMA data direction of dma_unmap_single()
In the error path of pci_epf_mhi_edma_write() function, the DMA data
direction passed (DMA_FROM_DEVICE) doesn't match the actual direction used
for the data transfer. Fix it by passing the correct one (DMA_TO_DEVICE).
Fixes: 7b99aaadda
("PCI: epf-mhi: Add eDMA support")
Reviewed-by: Krzysztof Wilczyński <kw@linux.com>
Link: https://lore.kernel.org/r/20231214063328.40657-1-manivannan.sadhasivam@linaro.org
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
This commit is contained in:
parent
309ab14f70
commit
327ec5f706
1 changed files with 1 additions and 1 deletions
|
@ -424,7 +424,7 @@ static int pci_epf_mhi_edma_write(struct mhi_ep_cntrl *mhi_cntrl,
|
|||
}
|
||||
|
||||
err_unmap:
|
||||
dma_unmap_single(dma_dev, src_addr, buf_info->size, DMA_FROM_DEVICE);
|
||||
dma_unmap_single(dma_dev, src_addr, buf_info->size, DMA_TO_DEVICE);
|
||||
err_unlock:
|
||||
mutex_unlock(&epf_mhi->lock);
|
||||
|
||||
|
|
Loading…
Reference in a new issue