Skip to content

Commit faedcc1

Browse files
dinghaoliubroonie
authored andcommitted
spi: tegra20-slink: 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 cddc36f commit faedcc1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/spi/spi-tegra20-slink.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1118,6 +1118,7 @@ static int tegra_slink_probe(struct platform_device *pdev)
11181118
ret = pm_runtime_get_sync(&pdev->dev);
11191119
if (ret < 0) {
11201120
dev_err(&pdev->dev, "pm runtime get failed, e = %d\n", ret);
1121+
pm_runtime_put_noidle(&pdev->dev);
11211122
goto exit_pm_disable;
11221123
}
11231124
tspi->def_command_reg = SLINK_M_S;

0 commit comments

Comments
 (0)