spi: tegra20-slink: add missing pm_runtime_put
Subsystems (3)
PATCH 1/1 spi: tegra20-slink: add missing pm_runtime_put
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
@@ -1192,6 +1192,7 @@ static int tegra_slink_resume(struct device *dev) ret =pm_runtime_get_sync (dev);if (ret <0 ) {dev_err (dev,"pm runtime failed, e = %d\n" , ret); +pm_runtime_put (dev);return ret; }tegra_slink_writel (tspi, tspi->command_reg,SLINK_COMMAND );
Signature · 1 line
2.17.1
Jon Hunter
maintainerQuoted 14 lines · Navid Emamdoost
Call to
pm_runtime_get_syncincrements counter even in case of failure leading to incorrect ref count.
Callpm_runtime_putifpm_runtime_get_syncfails.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 +0
-0
drivers/spi/spi-tegra20-slink.c static int tegra_slink_resume(struct device *dev) · line 1198
Quoted 7 lines
drivers/spi/spi-tegra20-slink.c +1
-0@@ -1192,6 +1192,7 @@ static int tegra_slink_resume(struct device *dev) ret =pm_runtime_get_sync (dev);if (ret <0 ) {dev_err (dev,"pm runtime failed, e = %d\n" , ret); +pm_runtime_put (dev);return ret; }tegra_slink_writel (tspi, tspi->command_reg,SLINK_COMMAND );
Please squash this patch with the other 2 that are fixing the same issues in the same driver.
Jon
Signature · 1 line
nvpublic