Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: 5648e56d03fa ("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>

authored by

Markus Elfring and committed by
Jon Mason
4279e72c 8144e9c8

+1 -3
+1 -3
drivers/ntb/test/ntb_perf.c
··· 839 839 dma_set_unmap(tx, unmap); 840 840 841 841 ret = dma_submit_error(dmaengine_submit(tx)); 842 - if (ret) { 843 - dmaengine_unmap_put(unmap); 842 + if (ret) 844 843 goto err_free_resource; 845 - } 846 844 847 845 dmaengine_unmap_put(unmap); 848 846