summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2026-01-28 02:19:00 +0000
committerMark Brown <broonie@kernel.org>2026-01-28 19:31:52 +0000
commit88340fc880cae6a2953a366aa6ad0900fd9830da (patch)
tree93e67421dfefc0942bd9af919da9ae18c032d33c
parentab3f4f0c7f3aa050cd602cc32830e24ac4aaee97 (diff)
ASoC: soc-core: add lockdep_assert_held() at snd_soc_unregister_dai()
snd_soc_register_dai() has lockdep_assert_held() (A), but snd_soc_unregister_dai() doesn't have lockdep_assert_held() (B). void snd_soc_unregister_dai(...) { (B) dev_dbg(...); list_del(...); } struct snd_soc_dai *snd_soc_register_dai(...) { ... (A) lockdep_assert_held(&client_mutex); ... } Both functions should be called with client_mutex lock. Add missing lockdep_assert_held() at snd_soc_unregister_dai(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87jyx21nu4.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/soc-core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 355ccc95f28b..5811d053ce7a 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -2679,6 +2679,8 @@ static inline char *fmt_multiple_name(struct device *dev,
void snd_soc_unregister_dai(struct snd_soc_dai *dai)
{
+ lockdep_assert_held(&client_mutex);
+
dev_dbg(dai->dev, "ASoC: Unregistered DAI '%s'\n", dai->name);
list_del(&dai->list);
}