[PATCH 2/6] spi: cadence-quadspi: fix clock imbalance on probe failure

Johan Hovold
2026-04-21T12:54:06Z

Drop the bogus runtime PM get on probe failures that was never needed
and that leaks a usage count reference while preventing the clocks from
being disabled (as runtime PM has not yet been enabled).

Fixes: 1889dd208197 ("spi: cadence-quadspi: Fix clock disable on probe failure path")
Cc: stable@vger.kernel.org # 6.19
Cc: Anurag Dutta <a-dutta@ti.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/spi/spi-cadence-quadspi.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c
index 5040e4e1cce0..b79f48f2420c 100644
--- a/drivers/spi/spi-cadence-quadspi.c
+++ b/drivers/spi/spi-cadence-quadspi.c
@@ -2004,8 +2004,7 @@ static int cqspi_probe(struct platform_device *pdev)
pm_runtime_disable(dev);
cqspi_controller_enable(cqspi, 0);
disable_clks:
- if (pm_runtime_get_sync(&pdev->dev) >= 0)
- clk_bulk_disable_unprepare(CLK_QSPI_NUM, cqspi->clks);
+ clk_bulk_disable_unprepare(CLK_QSPI_NUM, cqspi->clks);

return ret;
}
--
2.52.0