spi: tegra20-slink: call pm_runtime_put if pm_runtime_get_sync fails
Subsystems (3)
PATCH 1/1 spi: tegra20-slink: call pm_runtime_put if pm_runtime_get_sync fails
Call to pm_runtime_get_sync increments counter even in case of failure leading to incorrect ref count.
Call pm_runtime_put if pm_runtime_get_sync fails.
Signed-off-by Navid Emamdoost <[email protected]>
--- drivers/spi/spi-tegra20-slink.c | 1 + 1 file changed, 1 insertion(+)
drivers/spi/spi-tegra20-slink.c +1 -0
@@ -1118,6 +1118,7 @@ static int tegra_slink_probe(struct platform_device *pdev) ret =pm_runtime_get_sync (&pdev->dev);if (ret <0 ) {dev_err (&pdev->dev,"pm runtime get failed, e = %d\n" , ret); +pm_runtime_put (&pdev->dev); goto exit_pm_disable; } tspi->def_command_reg =SLINK_M_S ;
Signature · 1 line
2.17.1