Commit 0255200b authored by Alexandru Ardelean's avatar Alexandru Ardelean Committed by Vinod Koul
Browse files

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: default avatarAlexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 65102238
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -721,14 +721,14 @@ static int dmatest_func(void *data)

		status = dma_async_is_tx_complete(chan, cookie, NULL, NULL);

		if (!done->done) {
		dmaengine_unmap_put(um);

		if (!done->done) {
			result("test timed out", total_tests, src_off, dst_off,
			       len, 0);
			failed_tests++;
			continue;
		} else if (status != DMA_COMPLETE) {
			dmaengine_unmap_put(um);
			result(status == DMA_ERROR ?
			       "completion error status" :
			       "completion busy status", total_tests, src_off,
@@ -737,8 +737,6 @@ static int dmatest_func(void *data)
			continue;
		}

		dmaengine_unmap_put(um);

		if (params->noverify) {
			verbose_result("test passed", total_tests, src_off,
				       dst_off, len, 0);