]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
spi: cadence-quadspi: fix cleanup of rx_chan on failure paths
authorKhairul Anuar Romli <khairul.anuar.romli@altera.com>
Mon, 30 Jun 2025 09:11:56 +0000 (17:11 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Aug 2025 08:51:29 +0000 (09:51 +0100)
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/spi/spi-cadence-quadspi.c

index 506a139fbd2c5698b24825375f91adf0be16291b..b3a0bc8115934547ee054db5034ea14d1ada1d98 100644 (file)
@@ -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);