Skip to content

Commit b1b1f4b

Browse files
khalfellabjorn-helgaas
authored andcommitted
PCI: endpoint: pci-epf-test: Set dma_chan_rx pointer to NULL on error
If dma_chan_tx allocation fails, set dma_chan_rx to NULL after it is freed. Link: https://lore.kernel.org/r/[email protected] Fixes: 8353813 ("PCI: endpoint: Enable DMA tests for endpoints with DMA capabilities") Signed-off-by: Mohamed Khalfella <[email protected]> [kwilczynski: commit log] Signed-off-by: Krzysztof Wilczyński <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: Niklas Cassel <[email protected]> Reviewed-by: Manivannan Sadhasivam <[email protected]>
1 parent 40384c8 commit b1b1f4b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/pci/endpoint/functions/pci-epf-test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ static int pci_epf_test_init_dma_chan(struct pci_epf_test *epf_test)
251251

252252
fail_back_rx:
253253
dma_release_channel(epf_test->dma_chan_rx);
254-
epf_test->dma_chan_tx = NULL;
254+
epf_test->dma_chan_rx = NULL;
255255

256256
fail_back_tx:
257257
dma_cap_zero(mask);

0 commit comments

Comments
 (0)