tests: drivers: dma: remove dead code in test_dma_loop.c

Fix the error of the [Coverity CID :219489] "Structurally
dead code in tests/drivers/dma/loop_transfer/src/test_dma_loop.c"

Signed-off-by: Francois Ramu <francois.ramu@st.com>
This commit is contained in:
Francois Ramu 2021-03-09 16:49:40 +01:00 committed by Anas Nashif
commit 7664171518

View file

@ -146,11 +146,10 @@ static int test_loop(void)
if (transfer_count < TRANSFER_LOOPS) { if (transfer_count < TRANSFER_LOOPS) {
transfer_count = TRANSFER_LOOPS; transfer_count = TRANSFER_LOOPS;
TC_PRINT("ERROR: unfinished transfer\n"); TC_PRINT("ERROR: unfinished transfer\n");
return TC_FAIL;
if (dma_stop(dma, chan_id)) { if (dma_stop(dma, chan_id)) {
TC_PRINT("ERROR: transfer stop\n"); TC_PRINT("ERROR: transfer stop\n");
return TC_FAIL;
} }
return TC_FAIL;
} }
TC_PRINT("Each RX buffer should contain the full TX buffer string.\n"); TC_PRINT("Each RX buffer should contain the full TX buffer string.\n");