提交 ab3726f5 编写于 作者: J Jiasen Lin 提交者: Yang Yingliang

NTB: Fix static check warning in perf_clear_test

mainline inclusion
from mainline-v5.8-rc1
commit a0348a4d
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: 99a06056 ("NTB: ntb_perf: Fix address err in perf_copy_chunk")
Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NJiasen Lin <linjiasen@hygon.cn>
Signed-off-by: NJon Mason <jdmason@kudzu.us>
Signed-off-by: NHanjun Guo <guohanjun@huawei.com>
Reviewed-by: NXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 97bca9c6
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册