diff --git a/sound/core/pcm.c b/sound/core/pcm.c index c133f23418fe..35ece386d1a2 100644 --- a/sound/core/pcm.c +++ b/sound/core/pcm.c @@ -853,8 +853,10 @@ static int snd_pcm_free(struct snd_pcm *pcm) { if (!pcm) return 0; - if (!pcm->internal) - pcm_call_notify(pcm, n_unregister); + if (!pcm->internal) { + scoped_guard(mutex, ®ister_mutex) + pcm_call_notify(pcm, n_unregister); + } if (pcm->private_free) pcm->private_free(pcm); snd_pcm_lib_preallocate_free_for_all(pcm);