summaryrefslogtreecommitdiff
path: root/drivers/ntb
diff options
context:
space:
mode:
authorJiasen Lin <linjiasen@hygon.cn>2020-04-09 00:11:24 -0700
committerJon Mason <jdmason@kudzu.us>2020-04-13 10:28:34 -0400
commita0348a4da1a7073fa14065f370f507073b857782 (patch)
treeac39d5dd3e869099a6571f7139d23f96de309ab3 /drivers/ntb
parentf454f4d1915b44cc3857148aac7a297a31591501 (diff)
NTB: Fix static check warning in perf_clear_test
As pthr->dma_chan can't be NULL in this context, so there is no need to check pthr->dma_chan. Fixes: 99a06056124d ("NTB: ntb_perf: Fix address err in perf_copy_chunk") Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jiasen Lin <linjiasen@hygon.cn> Signed-off-by: Jon Mason <jdmason@kudzu.us>
Diffstat (limited to 'drivers/ntb')
-rw-r--r--drivers/ntb/test/ntb_perf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ntb/test/ntb_perf.c b/drivers/ntb/test/ntb_perf.c
index 972f6d984f6d..f73b126dde65 100644
--- a/drivers/ntb/test/ntb_perf.c
+++ b/drivers/ntb/test/ntb_perf.c
@@ -1010,8 +1010,8 @@ static void perf_clear_test(struct perf_thread *pthr)
pthr->perf->test_peer->dma_dst_addr,
pthr->perf->test_peer->outbuf_size,
DMA_FROM_DEVICE, 0);
- if (pthr->dma_chan)
- dma_release_channel(pthr->dma_chan);
+
+ dma_release_channel(pthr->dma_chan);
no_dma_notify:
atomic_dec(&perf->tsync);