[PATCH 6/6] ASoC: aw88166: fix the expected value printed in aw_dev_check_sysst() error

From: Marco Giunta

Date: Thu Nov 26 2026 - 16:29:18 EST


aw_dev_check_sysst() selects the expected system status in check_val
depending on whether the noise gate is enabled
(AW88166_BIT_SYSST_SWS_CHECK vs AW88166_BIT_SYSST_NOSWS_CHECK).
The value read from the SYSST register is then compared against check_val,
and the function returns an error if they don't match.

The error message, however, always prints AW88166_BIT_SYSST_NOSWS_CHECK
as the expected value instead of check_val, so the log is wrong whenever
the two differ.

Fix this discrepancy by printing check_val.

Fixes: 94e412c28e61 ("ASoC: codecs: Add aw88166 amplifier driver")
Signed-off-by: Marco Giunta <marco_giunta@xxxxxxxxxx>
---
sound/soc/codecs/aw88166.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/aw88166.c b/sound/soc/codecs/aw88166.c
index 92034c90d8d7..89ef6af6cf68 100644
--- a/sound/soc/codecs/aw88166.c
+++ b/sound/soc/codecs/aw88166.c
@@ -205,7 +205,7 @@ static int aw_dev_check_sysst(struct aw_device *aw_dev)

if ((reg_val & (~AW88166_BIT_SYSST_CHECK_MASK) & check_val) != check_val) {
dev_err(aw_dev->dev, "check sysst fail, cnt=%d, reg_val=0x%04x, check:0x%x",
- i, reg_val, AW88166_BIT_SYSST_NOSWS_CHECK);
+ i, reg_val, check_val);
usleep_range(AW88166_2000_US, AW88166_2000_US + 10);
} else {
return 0;
--
2.56.1