dmaengine: dmatest: unmap data on a single code-path when xfer done
After the DMA transfer is done, we don't need to call the un-mapping code in 3 places. One is enough. Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
parent
651022382c
commit
0255200bd2
|
@ -721,14 +721,14 @@ static int dmatest_func(void *data)
|
||||||
|
|
||||||
status = dma_async_is_tx_complete(chan, cookie, NULL, NULL);
|
status = dma_async_is_tx_complete(chan, cookie, NULL, NULL);
|
||||||
|
|
||||||
|
dmaengine_unmap_put(um);
|
||||||
|
|
||||||
if (!done->done) {
|
if (!done->done) {
|
||||||
dmaengine_unmap_put(um);
|
|
||||||
result("test timed out", total_tests, src_off, dst_off,
|
result("test timed out", total_tests, src_off, dst_off,
|
||||||
len, 0);
|
len, 0);
|
||||||
failed_tests++;
|
failed_tests++;
|
||||||
continue;
|
continue;
|
||||||
} else if (status != DMA_COMPLETE) {
|
} else if (status != DMA_COMPLETE) {
|
||||||
dmaengine_unmap_put(um);
|
|
||||||
result(status == DMA_ERROR ?
|
result(status == DMA_ERROR ?
|
||||||
"completion error status" :
|
"completion error status" :
|
||||||
"completion busy status", total_tests, src_off,
|
"completion busy status", total_tests, src_off,
|
||||||
|
@ -737,8 +737,6 @@ static int dmatest_func(void *data)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
dmaengine_unmap_put(um);
|
|
||||||
|
|
||||||
if (params->noverify) {
|
if (params->noverify) {
|
||||||
verbose_result("test passed", total_tests, src_off,
|
verbose_result("test passed", total_tests, src_off,
|
||||||
dst_off, len, 0);
|
dst_off, len, 0);
|
||||||
|
|
Loading…
Reference in New Issue