spi: cadence-quadspi: fix cleanup of rx_chan on failure paths
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 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.
--- drivers/spi/spi-cadence-quadspi.c | 5 ----- 1 file changed, 5 deletions(-)
drivers/spi/spi-cadence-quadspi.c +0 -5
@@ -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
Hello Khairul,
Quoted 8 lines · On 30/06/25 14:41, [email protected] wrote:
From: Khairul Anuar Romli <[email protected]>
Remove incorrect checks on
cqspi->rx_chanthat cause driver breakage during failure cleanup. Ensure proper resource freeing on the success path when operating incqspi->use_direct_mode, preventing leaks and improving stability.Signed-off-by Khairul Anuar Romli <[email protected]>
Please add 'Fixes' tag and add stable in cc.
Regards,
Santhosh.
Quoted 20 lines
--- drivers/spi/spi-cadence-quadspi.c | 5 ----- 1 file changed, 5 deletions(-)drivers/spi/spi-cadence-quadspi.c +0
-5@@ -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);
Quoted 8 lines · On Mon, Jun 30, 2025 at 05:11:56PM +0800, [email protected] wrote:
From: Khairul Anuar Romli <[email protected]>
Remove incorrect checks on
cqspi->rx_chanthat cause driver breakage during failure cleanup. Ensure proper resource freeing on the success path when operating incqspi->use_direct_mode, preventing leaks and improving stability.Signed-off-by Khairul Anuar Romli <[email protected]>
Thanks.
Mark asked me to fix this and I wrote a fix but apparently I didn't hit send because it's still in my outbox. Sorry about that. :(
regards,
dan carpenter
Quoted 13 lines
Quoted 8 lines · On Mon, Jun 30, 2025 at 05:11:56PM +0800, [email protected] wrote:
From: Khairul Anuar Romli <[email protected]>
Remove incorrect checks on
cqspi->rx_chanthat cause driver breakage during failure cleanup. Ensure proper resource freeing on the success path when operating incqspi->use_direct_mode, preventing leaks and improving stability.Signed-off-by Khairul Anuar Romli <[email protected]>Thanks.
Quoted 7 lines
Reviewed-by Dan Carpenter <[email protected]>Mark asked me to fix this and I wrote a fix but apparently I didn't hit send because it's still in my outbox. Sorry about that. :(
regards,
dan carpenter
Sorry for sending the fix on your behalf.
Quoted 15 lines · Khairul Anuar
Quoted 15 lines
Quoted 8 lines · On Mon, Jun 30, 2025 at 05:11:56PM +0800, [email protected] wrote:
From: Khairul Anuar Romli <[email protected]>
Remove incorrect checks on
cqspi->rx_chanthat cause driver breakage during failure cleanup. Ensure proper resource freeing on the success path when operating incqspi->use_direct_mode, preventing leaks and improving stability.Signed-off-by Khairul Anuar Romli <[email protected]>Thanks.
Reviewed-by Dan Carpenter <[email protected]>
Quoted 7 lines
Quoted 5 lines
Mark asked me to fix this and I wrote a fix but apparently I didn't hit send because it's still in my outbox. Sorry about that. :(
regards,
dan carpenterSorry for sending the fix on your behalf.
No no. You did the right thing. It's me who messed up.
regards,
dan carpenter
Mark Brown
maintainerQuoted 6 lines · On Mon, 30 Jun 2025 17:11:56 +0800, [email protected] wrote:
Remove incorrect checks on
cqspi->rx_chanthat cause driver breakage during failure cleanup. Ensure proper resource freeing on the success path when operating incqspi->use_direct_mode, preventing leaks and improving stability.
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
Thanks!
[1/1] spi: cadence-quadspi: fix cleanup of rx_chan on failure paths
commit: 04a8ff1bc3514808481ddebd454342ad902a3f60
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark