Skip to content

Commit e1f2e77

Browse files
Ali Tariqbroonie
authored andcommitted
spi: cadence-qspi: Fix runtime PM imbalance in probe
The probe function incorrectly calls pm_runtime_put_autosuspend() twice in succession at the end of successful probe, dropping two runtime PM references while only one was acquired earlier with pm_runtime_get_sync(). This causes a usage count underflow: cadence-qspi 13010000.spi: Runtime PM usage count underflow! Remove the first redundant pm_runtime_put_autosuspend() call to balance the reference count. Tested on StarFive VisionFive 2 v1.2A board. Fixes: 30dbc1c ("spi: cadence-qspi: defer runtime support on socfpga if reset bit is enabled") Signed-off-by: Ali Tariq <alitariq45892@gmail.com> Link: https://patch.msgid.link/20251130091251.12120-1-alitariq45892@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent cb5c2eb commit e1f2e77

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

drivers/spi/spi-cadence-quadspi.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2012,7 +2012,6 @@ static int cqspi_probe(struct platform_device *pdev)
20122012
}
20132013

20142014
if (!(ddata && (ddata->quirks & CQSPI_DISABLE_RUNTIME_PM))) {
2015-
pm_runtime_put_autosuspend(dev);
20162015
pm_runtime_mark_last_busy(dev);
20172016
pm_runtime_put_autosuspend(dev);
20182017
}

0 commit comments

Comments
 (0)