Skip to content

Commit

Permalink
NTB: Fix static check warning in perf_clear_test
Browse files Browse the repository at this point in the history
As pthr->dma_chan can't be NULL in this context, so there is
no need to check pthr->dma_chan.

Fixes: 99a0605 ("NTB: ntb_perf: Fix address err in perf_copy_chunk")
Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Jiasen Lin <[email protected]>
Signed-off-by: Jon Mason <[email protected]>
  • Loading branch information
Jiasen Lin authored and jonmason committed Apr 13, 2020
1 parent f454f4d commit a0348a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/ntb/test/ntb_perf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a0348a4

Please sign in to comment.