Skip to content

Commit aae86cf

Browse files
plbossartbroonie
authored andcommitted
ASoC: rt711-sdw: fix locking sequence
The disable_irq_lock protects the 'disable_irq' value, we need to lock before testing it. Fixes: b69de26 ("ASoC: rt711: fix for JD event handling in ClockStop Mode0") Signed-off-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Bard Liao <[email protected]> Reviewed-by: Chao Song <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent ee28777 commit aae86cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sound/soc/codecs/rt711-sdw.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -536,12 +536,12 @@ static int __maybe_unused rt711_dev_resume(struct device *dev)
536536
return 0;
537537

538538
if (!slave->unattach_request) {
539+
mutex_lock(&rt711->disable_irq_lock);
539540
if (rt711->disable_irq == true) {
540-
mutex_lock(&rt711->disable_irq_lock);
541541
sdw_write_no_pm(slave, SDW_SCP_INTMASK1, SDW_SCP_INT1_IMPL_DEF);
542542
rt711->disable_irq = false;
543-
mutex_unlock(&rt711->disable_irq_lock);
544543
}
544+
mutex_unlock(&rt711->disable_irq_lock);
545545
goto regmap_sync;
546546
}
547547

0 commit comments

Comments
 (0)