Skip to content

Commit cd20dc3

Browse files
Dan Carpenterjonmason
authored andcommitted
ntb_perf: Fix an error code in perf_copy_chunk()
We accidentally return success if dmaengine_submit() fails. The fix is to preserve the error code from dma_submit_error(). Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Serge Semin <fancer.lancer@gmail.com> Signed-off-by: Jon Mason <jdmason@kudzu.us>
1 parent ae07abd commit cd20dc3

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎drivers/ntb/test/ntb_perf.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -828,7 +828,8 @@ static int perf_copy_chunk(struct perf_thread *pthr,
828828
tx->callback_param = pthr;
829829
dma_set_unmap(tx, unmap);
830830

831-
if (dma_submit_error(dmaengine_submit(tx))) {
831+
ret = dma_submit_error(dmaengine_submit(tx));
832+
if (ret) {
832833
dmaengine_unmap_put(unmap);
833834
goto err_free_resource;
834835
}

0 commit comments

Comments
 (0)