summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKhairul Anuar Romli <khairul.anuar.romli@altera.com>2025-07-29 19:11:14 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-08-01 09:47:33 +0100
commit1af6d1696ca40b2d22889b4b8bbea616f94aaa84 (patch)
tree0ded27e86b79119ae8898971e5f13fb819b201ba
parentaed4053c506be9f73a713a4162ccad5429745b37 (diff)
spi: cadence-quadspi: fix cleanup of rx_chan on failure paths
commit 04a8ff1bc3514808481ddebd454342ad902a3f60 upstream. 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> [Minor conflict resolved due to code context change.] Signed-off-by: Ronald Wahl <ronald.wahl@legrand.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.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 9285a683324f4..7c17b8c0425e3 100644
--- a/drivers/spi/spi-cadence-quadspi.c
+++ b/drivers/spi/spi-cadence-quadspi.c
@@ -1870,11 +1870,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;
- }
-
ret = spi_register_controller(host);
if (ret) {
dev_err(&pdev->dev, "failed to register SPI ctlr %d\n", ret);