]> Git Repo - linux.git/commitdiff
ntb_perf: Fix an error code in perf_copy_chunk()
authorDan Carpenter <[email protected]>
Tue, 23 Jan 2018 08:33:56 +0000 (11:33 +0300)
committerJon Mason <[email protected]>
Mon, 29 Jan 2018 03:17:24 +0000 (22:17 -0500)
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 <[email protected]>
Acked-by: Serge Semin <[email protected]>
Signed-off-by: Jon Mason <[email protected]>
drivers/ntb/test/ntb_perf.c

index 1829a17dd461f7c9b9c8f5703098bda4a395b9e0..b376609ffadbba5150cbc96e46f2cac6db687930 100644 (file)
@@ -828,7 +828,8 @@ static int perf_copy_chunk(struct perf_thread *pthr,
        tx->callback_param = pthr;
        dma_set_unmap(tx, unmap);
 
-       if (dma_submit_error(dmaengine_submit(tx))) {
+       ret = dma_submit_error(dmaengine_submit(tx));
+       if (ret) {
                dmaengine_unmap_put(unmap);
                goto err_free_resource;
        }
This page took 0.05773 seconds and 4 git commands to generate.