Skip to contentSkip to conversation

spi: cadence-quadspi: fix cleanup of rx_chan on failure paths

PATCH New [email protected] 1 participant 1 message Jun 30, 2025 1 message not in the archive SPI

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH v2 1/1 spi: cadence-quadspi: fix cleanup of rx_chan on failure paths

From: Khairul Anuar Romli <[email protected]>

Remove incorrect checks on cqspi->rx_chan that cause driver breakage during failure cleanup. Ensure proper resource freeing on the success path when operating in cqspi->use_direct_mode, preventing leaks and improving stability.

Fixes b07f349d1864 ("spi: spi-cadence-quadspi: Fix pm runtime unbalance")

---
Changes in v2:
- Add Fixes tag and stable in cc.

---
 drivers/spi/spi-cadence-quadspi.c | 5 -----
 1 file changed, 5 deletions(-)
drivers/spi/spi-cadence-quadspi.c +0 -5
index aa1932ba17cb..d3c78f59b22c 100644
@@ -1960,11 +1960,6 @@ static int cqspi_probe(struct platform_device *pdev)
 
 	pm_runtime_enable(dev);
 
-	if (cqspi->rx_chan) {
-		dma_release_channel(cqspi->rx_chan);
-		goto probe_setup_failed;
-	}
-
 	pm_runtime_set_autosuspend_delay(dev, CQSPI_AUTOSUSPEND_TIMEOUT);
 	pm_runtime_use_autosuspend(dev);
 	pm_runtime_get_noresume(dev);
Signature · 1 line
2.35.3