Skip to content

Commit 117858b

Browse files
dinghaoliubroonie
authored andcommitted
spi: tegra20-sflash: 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 faedcc1 commit 117858b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/spi/spi-tegra20-sflash.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,7 @@ static int tegra_sflash_probe(struct platform_device *pdev)
491491
ret = pm_runtime_get_sync(&pdev->dev);
492492
if (ret < 0) {
493493
dev_err(&pdev->dev, "pm runtime get failed, e = %d\n", ret);
494+
pm_runtime_put_noidle(&pdev->dev);
494495
goto exit_pm_disable;
495496
}
496497

0 commit comments

Comments
 (0)