Skip to content

Commit 618d815

Browse files
Zhang Qilongbroonie
authored andcommitted
spi: dw: Fix PM disable depth imbalance in dw_spi_bt1_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:abf00907538e2 ("spi: dw: Add Baikal-T1 SPI Controller glue driver") Signed-off-by: Zhang Qilong <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 4d0ef0a commit 618d815

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/spi/spi-dw-bt1.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,8 +293,10 @@ static int dw_spi_bt1_probe(struct platform_device *pdev)
293293
pm_runtime_enable(&pdev->dev);
294294

295295
ret = dw_spi_add_host(&pdev->dev, dws);
296-
if (ret)
296+
if (ret) {
297+
pm_runtime_disable(&pdev->dev);
297298
goto err_disable_clk;
299+
}
298300

299301
platform_set_drvdata(pdev, dwsbt1);
300302

0 commit comments

Comments
 (0)