spi: tegra20-slink: fix reference leak in slink ops of tegra20
authorZhang Qilong <zhangqilong3@huawei.com>
Tue, 3 Nov 2020 14:13:45 +0000 (22:13 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Dec 2020 12:46:52 +0000 (13:46 +0100)
commit345f6b3bfc9f41f00a4837139d7e04f8a245abfc
tree7a1d8101df3afee58f6cd853cd38b826d88d7891
parent1d0d30e1e5e6b846e919418111e9f2a959201179
spi: tegra20-slink: fix reference leak in slink ops of tegra20

[ Upstream commit 763eab7074f6e71babd85d796156f05a675f9510 ]

pm_runtime_get_sync will increment pm usage counter even it
failed. Forgetting to pm_runtime_put_noidle will result in
reference leak in two callers(tegra_slink_setup and
tegra_slink_resume), so we should fix it.

Fixes: dc4dc36056392 ("spi: tegra: add spi driver for SLINK controller")
Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Link: https://lore.kernel.org/r/20201103141345.6188-1-zhangqilong3@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/spi/spi-tegra20-slink.c