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]>
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;
}