File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
drivers/pci/endpoint/functions Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -301,15 +301,20 @@ static void pci_epf_test_clean_dma_chan(struct pci_epf_test *epf_test)
301301 if (!epf_test -> dma_supported )
302302 return ;
303303
304- dma_release_channel (epf_test -> dma_chan_tx );
305- if (epf_test -> dma_chan_tx == epf_test -> dma_chan_rx ) {
304+ if (epf_test -> dma_chan_tx ) {
305+ dma_release_channel (epf_test -> dma_chan_tx );
306+ if (epf_test -> dma_chan_tx == epf_test -> dma_chan_rx ) {
307+ epf_test -> dma_chan_tx = NULL ;
308+ epf_test -> dma_chan_rx = NULL ;
309+ return ;
310+ }
306311 epf_test -> dma_chan_tx = NULL ;
307- epf_test -> dma_chan_rx = NULL ;
308- return ;
309312 }
310313
311- dma_release_channel (epf_test -> dma_chan_rx );
312- epf_test -> dma_chan_rx = NULL ;
314+ if (epf_test -> dma_chan_rx ) {
315+ dma_release_channel (epf_test -> dma_chan_rx );
316+ epf_test -> dma_chan_rx = NULL ;
317+ }
313318}
314319
315320static void pci_epf_test_print_rate (struct pci_epf_test * epf_test ,
You can’t perform that action at this time.
0 commit comments