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>
This commit is contained in:
parent
ae07abdb84
commit
cd20dc3ca7
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue