Skip to content

Commit 1af6d16

Browse files
kromligregkh
authored andcommitted
spi: cadence-quadspi: fix cleanup of rx_chan on failure paths
commit 04a8ff1 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>
1 parent aed4053 commit 1af6d16

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

drivers/spi/spi-cadence-quadspi.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1870,11 +1870,6 @@ static int cqspi_probe(struct platform_device *pdev)
18701870

18711871
pm_runtime_enable(dev);
18721872

1873-
if (cqspi->rx_chan) {
1874-
dma_release_channel(cqspi->rx_chan);
1875-
goto probe_setup_failed;
1876-
}
1877-
18781873
ret = spi_register_controller(host);
18791874
if (ret) {
18801875
dev_err(&pdev->dev, "failed to register SPI ctlr %d\n", ret);

0 commit comments

Comments
 (0)