提交 cd20dc3c 编写于 作者: D Dan Carpenter 提交者: Jon Mason

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: NDan Carpenter <dan.carpenter@oracle.com>
Acked-by: NSerge Semin <fancer.lancer@gmail.com>
Signed-off-by: NJon Mason <jdmason@kudzu.us>
上级 ae07abdb
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册