summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKhairul Anuar Romli <khairul.anuar.romli@altera.com>2025-06-30 17:11:56 +0800
committerMark Brown <broonie@kernel.org>2025-07-01 14:02:26 +0100
commit04a8ff1bc3514808481ddebd454342ad902a3f60 (patch)
treeb88c2c8a71bdc124cecdd587c86681a5b091f689
parent4ec24e9601d5cfc9ac9798c0acb8e88c6ab61fc5 (diff)
spi: cadence-quadspi: fix cleanup of rx_chan on failure paths
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. Signed-off-by: Khairul Anuar Romli <khairul.anuar.romli@altera.com> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://patch.msgid.link/89765a2b94f047ded4f14babaefb7ef92ba07cb2.1751274389.git.khairul.anuar.romli@altera.com Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--drivers/spi/spi-cadence-quadspi.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c
index aa1932ba17cb..d3c78f59b22c 100644
--- a/drivers/spi/spi-cadence-quadspi.c
+++ b/drivers/spi/spi-cadence-quadspi.c
@@ -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);