Skip to content

Commit 4279e72

Browse files
elfringjonmason
authored andcommitted
ntb_perf: Delete duplicate dmaengine_unmap_put() call in perf_copy_chunk()
The function call “dmaengine_unmap_put(unmap)” was used in an if branch. The same call was immediately triggered by a subsequent goto statement. Thus avoid such a call repetition. This issue was detected by using the Coccinelle software. Fixes: 5648e56 ("NTB: ntb_perf: Add full multi-port NTB API support") Cc: stable@vger.kernel.org Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Jon Mason <jdmason@kudzu.us>
1 parent 8144e9c commit 4279e72

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/ntb/test/ntb_perf.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -839,10 +839,8 @@ static int perf_copy_chunk(struct perf_thread *pthr,
839839
dma_set_unmap(tx, unmap);
840840

841841
ret = dma_submit_error(dmaengine_submit(tx));
842-
if (ret) {
843-
dmaengine_unmap_put(unmap);
842+
if (ret)
844843
goto err_free_resource;
845-
}
846844

847845
dmaengine_unmap_put(unmap);
848846

0 commit comments

Comments
 (0)