]> git.itanic.dy.fi Git - linux-stable/commit
ASoC: tegra: Fix reference count leaks.
authorQiushi Wu <wu000273@umn.edu>
Sat, 13 Jun 2020 20:44:19 +0000 (15:44 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Sep 2020 09:21:15 +0000 (11:21 +0200)
commited7edd4264c385a833fe985f11ce21c14faef35e
treef3f2fdc9722cf7c0bf47642ba5ca542a4d1f5243
parentafe08604c6329451751ac3e81fccb11138e2d45e
ASoC: tegra: Fix reference count leaks.

[ Upstream commit deca195383a6085be62cb453079e03e04d618d6e ]

Calling pm_runtime_get_sync increments the counter even in case of
failure, causing incorrect ref count if pm_runtime_put is not called in
error handling paths. Call pm_runtime_put if pm_runtime_get_sync fails.

Signed-off-by: Qiushi Wu <wu000273@umn.edu>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Link: https://lore.kernel.org/r/20200613204422.24484-1-wu000273@umn.edu
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/tegra/tegra30_ahub.c
sound/soc/tegra/tegra30_i2s.c