Skip to content

Commit 294b738

Browse files
Tzung-Bi Shihbroonie
authored andcommitted
ASoC: max98090: fix deadlock in max98090_dapm_put_enum_double()
Commit 62d5ae4 ("ASoC: max98090: save and restore SHDN when changing sensitive registers SHDN bit") uses dapm_mutex to protect SHDN bit. However, snd_soc_dapm_put_enum_double() in max98090_dapm_put_enum_double() acquires the dapm_mutex again which cause a deadlock. Use snd_soc_dapm_put_enum_double_locked() instead to fix the deadlock. Fixes: 62d5ae4 ("ASoC: max98090: save and restore SHDN when changing sensitive registers SHDN bit") Signed-off-by: Tzung-Bi Shih <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 839284e commit 294b738

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sound/soc/codecs/max98090.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ static int max98090_dapm_put_enum_double(struct snd_kcontrol *kcontrol,
8888
int ret;
8989

9090
max98090_shdn_save(max98090);
91-
ret = snd_soc_dapm_put_enum_double(kcontrol, ucontrol);
91+
ret = snd_soc_dapm_put_enum_double_locked(kcontrol, ucontrol);
9292
max98090_shdn_restore(max98090);
9393

9494
return ret;

0 commit comments

Comments
 (0)