ntb_perf: Delete duplicate dmaengine_unmap_put() call in perf_copy_chunk()
commit4279e72cabupstream. 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:5648e56d03("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
3820d20d51
commit
2e6df032a0
@@ -839,10 +839,8 @@ static int perf_copy_chunk(struct perf_thread *pthr,
|
||||
dma_set_unmap(tx, unmap);
|
||||
|
||||
ret = dma_submit_error(dmaengine_submit(tx));
|
||||
if (ret) {
|
||||
dmaengine_unmap_put(unmap);
|
||||
if (ret)
|
||||
goto err_free_resource;
|
||||
}
|
||||
|
||||
dmaengine_unmap_put(unmap);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user