Skip to content

Commit cddc36f

Browse files
dinghaoliubroonie
authored andcommitted
spi: tegra114: Fix runtime PM imbalance on error
pm_runtime_get_sync() increments the runtime PM usage counter even when it returns an error code. Thus a pairing decrement is needed on the error handling path to keep the counter balanced. Signed-off-by: Dinghao Liu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 8d72880 commit cddc36f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/spi/spi-tegra114.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1398,6 +1398,7 @@ static int tegra_spi_probe(struct platform_device *pdev)
13981398
ret = pm_runtime_get_sync(&pdev->dev);
13991399
if (ret < 0) {
14001400
dev_err(&pdev->dev, "pm runtime get failed, e = %d\n", ret);
1401+
pm_runtime_put_noidle(&pdev->dev);
14011402
goto exit_pm_disable;
14021403
}
14031404

0 commit comments

Comments
 (0)