]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
spi: spi-cadence-quadspi: Remove duplicate pm_runtime_put_autosuspend() call
authorAnurag Dutta <a-dutta@ti.com>
Wed, 5 Nov 2025 16:11:46 +0000 (21:41 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 6 Dec 2025 21:27:33 +0000 (06:27 +0900)
[ Upstream commit 10eaa4c4a257944e9b30d13fda7d09164a70866d ]

Fix runtime PM usage count underflow caused by calling
pm_runtime_put_autosuspend() twice with only one corresponding
pm_runtime_get_noresume() call. This triggers the warning:
"Runtime PM usage count underflow!"

Remove the duplicate put call to balance the runtime PM reference
counting.

Fixes: 30dbc1c8d50f ("spi: cadence-qspi: defer runtime support on socfpga if reset bit is enabled")
Signed-off-by: Anurag Dutta <a-dutta@ti.com>
Link: https://patch.msgid.link/20251105161146.2019090-3-a-dutta@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/spi/spi-cadence-quadspi.c

index ce0f605ab688bf5b15e59e1cb93e69af0beaad4f..d7720931403c21f01f4073102bc0660940e53546 100644 (file)
@@ -2012,7 +2012,6 @@ static int cqspi_probe(struct platform_device *pdev)
        }
 
        if (!(ddata && (ddata->quirks & CQSPI_DISABLE_RUNTIME_PM))) {
-               pm_runtime_put_autosuspend(dev);
                pm_runtime_mark_last_busy(dev);
                pm_runtime_put_autosuspend(dev);
        }