Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Kuninori Morimoto and committed by
Mark Brown
88340fc8 ab3f4f0c

+2
+2
sound/soc/soc-core.c
··· 2679 2679 2680 2680 void snd_soc_unregister_dai(struct snd_soc_dai *dai) 2681 2681 { 2682 + lockdep_assert_held(&client_mutex); 2683 + 2682 2684 dev_dbg(dai->dev, "ASoC: Unregistered DAI '%s'\n", dai->name); 2683 2685 list_del(&dai->list); 2684 2686 }