From ab3726f5d9c6c931927bdb2ce83b29ca8f170261 Mon Sep 17 00:00:00 2001 From: Jiasen Lin Date: Mon, 17 Aug 2020 10:06:18 +0000 Subject: [PATCH] NTB: Fix static check warning in perf_clear_test mainline inclusion from mainline-v5.8-rc1 commit a0348a4da1a7073fa14065f370f507073b857782 category: bugfix bugzilla: NA CVE: NA --------------------------- 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 Signed-off-by: Jiasen Lin Signed-off-by: Jon Mason Signed-off-by: Hanjun Guo Reviewed-by: Xie XiuQi Signed-off-by: Yang Yingliang --- drivers/ntb/test/ntb_perf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/ntb/test/ntb_perf.c b/drivers/ntb/test/ntb_perf.c index 8cabc07f1fe5..ce6fa28d4cac 100644 --- a/drivers/ntb/test/ntb_perf.c +++ b/drivers/ntb/test/ntb_perf.c @@ -1005,8 +1005,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); -- GitLab