[PATCH 0/2] spi: cadence-quadspi: fix probe error path and remove

Diogo Ivo (Schneider Electric) posted 2 patches 2 months ago
There is a newer version of this series
drivers/spi/spi-cadence-quadspi.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
[PATCH 0/2] spi: cadence-quadspi: fix probe error path and remove
Posted by Diogo Ivo (Schneider Electric) 2 months ago
This series fixes two resource leaks in the cadence-quadspi driver's
probe error path and remove callback.

Patch 1 fixes an imbalanced pm_runtime_enable()/pm_runtime_disable()
pair: when probe defers after cqspi_request_mmap_dma(),
pm_runtime_disable() is called without a prior pm_runtime_enable().
It also adds the missing pm_runtime_dont_use_autosuspend() in both
the probe error path and the remove callback and a missing
pm_runtime_put_noidle() in the probe error path. This consolidates
fixes from upstream commits 5ff4d5d1af0c and 5e8bb0cc72f1.

Patch 2 fixes a DMA channel leak: when spi_register_controller() fails,
the channel acquired via cqspi_request_mmap_dma() is never released.
A dedicated error label is added to release it before the runtime PM
teardown. This fix is one part of upstream commit f18c8cfa4f1a.

Signed-off-by: Diogo Ivo (Schneider Electric) <diogo.ivo@bootlin.com>
---
Diogo Ivo (Schneider Electric) (2):
      spi: cadence-quadspi: fix runtime pm cleanup on probe failure/unbind
      spi: cadence-quadspi: release DMA channel on probe failure

 drivers/spi/spi-cadence-quadspi.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
---
base-commit: 52a355b23cd2dd77b683ed1a1bbe2b7408bd9c74
change-id: 20260730-cqspi-pm_runtime-a8a1c6122944

Best regards,
--  
Diogo Ivo <diogo.ivo@bootlin.com>
Re: [PATCH 0/2] spi: cadence-quadspi: fix probe error path and remove
Posted by Mark Brown 2 months ago
On Fri, Jul 31, 2026 at 12:53:45PM +0200, Diogo Ivo (Schneider Electric) wrote:
> This series fixes two resource leaks in the cadence-quadspi driver's
> probe error path and remove callback.

This doesn't apply against current code, please check and resend.

> base-commit: 52a355b23cd2dd77b683ed1a1bbe2b7408bd9c74

That's v6.12, that's rather ancient...
Re: [PATCH 0/2] spi: cadence-quadspi: fix probe error path and remove
Posted by Diogo Ivo 2 months ago
Hi Mark,

On 8/1/26 1:48 AM, Mark Brown wrote:
> On Fri, Jul 31, 2026 at 12:53:45PM +0200, Diogo Ivo (Schneider Electric) wrote:
>> This series fixes two resource leaks in the cadence-quadspi driver's
>> probe error path and remove callback.
> 
> This doesn't apply against current code, please check and resend.

This series is meant to be applied only on the stable trees, as there
was a backport there that broke probing in certain scenarios. I should
have mentioned this more clearly in the cover letter, apologies for the
noise. If I need to resend explicitly mentioning which stable trees this
patch should be applied to let me know and I'll happily do it.

>> base-commit: 52a355b23cd2dd77b683ed1a1bbe2b7408bd9c74
> 
> That's v6.12, that's rather ancient...

Best regards,
Diogo
Re: [PATCH 0/2] spi: cadence-quadspi: fix probe error path and remove
Posted by Greg Kroah-Hartman 2 months ago
On Sat, Aug 01, 2026 at 01:27:10PM +0200, Diogo Ivo wrote:
> Hi Mark,
> 
> On 8/1/26 1:48 AM, Mark Brown wrote:
> > On Fri, Jul 31, 2026 at 12:53:45PM +0200, Diogo Ivo (Schneider Electric) wrote:
> > > This series fixes two resource leaks in the cadence-quadspi driver's
> > > probe error path and remove callback.
> > 
> > This doesn't apply against current code, please check and resend.
> 
> This series is meant to be applied only on the stable trees, as there
> was a backport there that broke probing in certain scenarios. I should
> have mentioned this more clearly in the cover letter, apologies for the
> noise. If I need to resend explicitly mentioning which stable trees this
> patch should be applied to let me know and I'll happily do it.

Please do, as I'm confused :)