mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
nvmet: pci-epf: Remove unnecessary dmaengine_terminate_sync() on each DMA transfer
dmaengine_terminate_sync() cancels all pending requests. Calling it for every DMA transfer is unnecessary and counterproductive. This function is generally intended for cleanup paths such as module removal, device close, or unbind operations. Remove the redundant calls for success path and keep it only at error path. Tested-by: Niklas Cassel <cassel@kernel.org> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Acked-by: Manivannan Sadhasivam <mani@kernel.org> Signed-off-by: Frank Li <Frank.Li@nxp.com> Link: https://patch.msgid.link/20260521-dma_prep_config-v7-6-1f73f4899883@nxp.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
parent
1af246e9d2
commit
bd00d2c4a1
|
|
@ -420,10 +420,9 @@ static int nvmet_pci_epf_dma_transfer(struct nvmet_pci_epf *nvme_epf,
|
|||
if (dma_sync_wait(chan, cookie) != DMA_COMPLETE) {
|
||||
dev_err(dev, "DMA transfer failed\n");
|
||||
ret = -EIO;
|
||||
dmaengine_terminate_sync(chan);
|
||||
}
|
||||
|
||||
dmaengine_terminate_sync(chan);
|
||||
|
||||
unmap:
|
||||
dma_unmap_single(dma_dev, dma_addr, seg->length, dir);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user