Skip to content

Commit 327ec5f

Browse files
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: 7b99aaa ("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>
1 parent 309ab14 commit 327ec5f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/pci/endpoint/functions/pci-epf-mhi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ static int pci_epf_mhi_edma_write(struct mhi_ep_cntrl *mhi_cntrl,
424424
}
425425

426426
err_unmap:
427-
dma_unmap_single(dma_dev, src_addr, buf_info->size, DMA_FROM_DEVICE);
427+
dma_unmap_single(dma_dev, src_addr, buf_info->size, DMA_TO_DEVICE);
428428
err_unlock:
429429
mutex_unlock(&epf_mhi->lock);
430430

0 commit comments

Comments
 (0)