linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI: endpoint: Set RX DMA channel to NULL aftre freeing it
@ 2024-12-21  3:00 Mohamed Khalfella
  2024-12-21  8:24 ` Niklas Cassel
  2024-12-21 19:18 ` [PATCH] PCI: endpoint: Set RX DMA channel to NULL aftre freeing it Markus Elfring
  0 siblings, 2 replies; 12+ messages in thread
From: Mohamed Khalfella @ 2024-12-21  3:00 UTC (permalink / raw)
  To: Manivannan Sadhasivam, Krzysztof Wilczyński,
	Kishon Vijay Abraham I, Bjorn Helgaas, Niklas Cassel, Frank Li,
	Damien Le Moal, Mohamed Khalfella, Wang Jiang
  Cc: Krzysztof Wilczyński, linux-pci, linux-kernel

Fixed a small bug in pci-epf-test driver. When requesting TX DMA channel
fails, free already allocated RX channel and set it to NULL.

Fixes: 8353813c88ef ("PCI: endpoint: Enable DMA tests for endpoints with DMA capabilities")

Signed-off-by: Mohamed Khalfella <khalfella@gmail.com>
---
 drivers/pci/endpoint/functions/pci-epf-test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/endpoint/functions/pci-epf-test.c b/drivers/pci/endpoint/functions/pci-epf-test.c
index ef6677f34116..d90c8be7371e 100644
--- a/drivers/pci/endpoint/functions/pci-epf-test.c
+++ b/drivers/pci/endpoint/functions/pci-epf-test.c
@@ -251,7 +251,7 @@ static int pci_epf_test_init_dma_chan(struct pci_epf_test *epf_test)
 
 fail_back_rx:
 	dma_release_channel(epf_test->dma_chan_rx);
-	epf_test->dma_chan_tx = NULL;
+	epf_test->dma_chan_rx = NULL;
 
 fail_back_tx:
 	dma_cap_zero(mask);
-- 
2.45.2


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2025-01-15 11:25 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-21  3:00 [PATCH] PCI: endpoint: Set RX DMA channel to NULL aftre freeing it Mohamed Khalfella
2024-12-21  8:24 ` Niklas Cassel
2024-12-21 17:34   ` [PATCH v2] PCI: endpoint: Set RX DMA channel to NULL after " Mohamed Khalfella
2024-12-26 16:31     ` Manivannan Sadhasivam
2024-12-26 17:51       ` Mohamed Khalfella
2024-12-27 13:59         ` Manivannan Sadhasivam
2024-12-27 16:08           ` [PATCH v3] PCI: endpoint: pci-epf-test: Fix NULL ptr assignment to dma_chan_rx Mohamed Khalfella
2024-12-30  7:26             ` Manivannan Sadhasivam
2024-12-30 18:36               ` Mohamed Khalfella
2025-01-15 11:25             ` Krzysztof Wilczyński
2024-12-21 19:18 ` [PATCH] PCI: endpoint: Set RX DMA channel to NULL aftre freeing it Markus Elfring
2024-12-21 20:00   ` Mohamed Khalfella

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).