]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ASoC: amd: acp: Fix possible deadlock
authorDaniel Baluta <daniel.baluta@nxp.com>
Mon, 27 Jan 2025 08:34:22 +0000 (10:34 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 8 Feb 2025 09:02:17 +0000 (10:02 +0100)
commitb80ab0294a15f7047f6956211e20286fbfa3f405
treeb1aaebd3e8daaa0b499329138ce6fc1ce6661683
parent016bc7b496d8f77d287fc8912aa2a53961eeab92
ASoC: amd: acp: Fix possible deadlock

[ Upstream commit 3ff53862c322aa7bb115d84348d5a641dc905d87 ]

On error path, function acp_i2s_set_tdm_slot returns without releasing
the lock and this could result in potential deadlocks in the future.

Error reported by sparse:
sound/soc/amd/acp/acp-i2s.c:95:12: error: context imbalance in
'acp_i2s_set_tdm_slot' - different lock contexts for basic block

Fixes: cd60dec8994c ("ASoC: amd: acp: Refactor TDM slots selction based on acp revision id")
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20250127083422.20406-1-daniel.baluta@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/amd/acp/acp-i2s.c