diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2018-01-23 11:33:56 +0300 |
---|---|---|
committer | Jon Mason <jdmason@kudzu.us> | 2018-01-29 06:17:24 +0300 |
commit | cd20dc3ca75f17fd391e825b1606050bd62703fc (patch) | |
tree | 55baf1f3aee9d17eaed27f0e6e826cb6f7e09b4b /drivers/ntb | |
parent | ae07abdb84b267627f6e10fb813e62de5c3c8117 (diff) | |
download | linux-cd20dc3ca75f17fd391e825b1606050bd62703fc.tar.xz |
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>
Diffstat (limited to 'drivers/ntb')
-rw-r--r-- | drivers/ntb/test/ntb_perf.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/ntb/test/ntb_perf.c b/drivers/ntb/test/ntb_perf.c index 1829a17dd461..b376609ffadb 100644 --- a/drivers/ntb/test/ntb_perf.c +++ b/drivers/ntb/test/ntb_perf.c @@ -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; } |