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 <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Chao Song <chao.song@linux.intel.com> Link: https://msgid.link/r/20240325221817.206465-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent ee28777 commit aae86cf

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

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)