Skip to content

Commit 4d0ef0a

Browse files
Zhang Qilongbroonie
authored andcommitted
spi: cadence-quadspi: Fix PM disable depth imbalance in cqspi_probe
The pm_runtime_enable will increase power disable depth. Thus a pairing decrement is needed on the error handling path to keep it balanced according to context. Fixes:73d5fe0462702 ("spi: cadence-quadspi: Remove spi_master_put() in probe failure path") Signed-off-by: Zhang Qilong <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent a6bfc42 commit 4d0ef0a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/spi/spi-cadence-quadspi.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1619,7 +1619,7 @@ static int cqspi_probe(struct platform_device *pdev)
16191619
pm_runtime_enable(dev);
16201620
ret = pm_runtime_resume_and_get(dev);
16211621
if (ret < 0)
1622-
return ret;
1622+
goto probe_pm_failed;
16231623

16241624
ret = clk_prepare_enable(cqspi->clk);
16251625
if (ret) {
@@ -1712,6 +1712,7 @@ static int cqspi_probe(struct platform_device *pdev)
17121712
clk_disable_unprepare(cqspi->clk);
17131713
probe_clk_failed:
17141714
pm_runtime_put_sync(dev);
1715+
probe_pm_failed:
17151716
pm_runtime_disable(dev);
17161717
return ret;
17171718
}

0 commit comments

Comments
 (0)