[PATCH 72/78] ASoC: codecs: wm8903: Use guard() for mutex locks

From: phucduc . bui

Date: Thu Jun 18 2026 - 07:17:21 EST


From: bui duc phuc <phucduc.bui@xxxxxxxxx>

Clean up the code using guard() for mutex locks.
Merely code refactoring, and no behavior change.

Signed-off-by: bui duc phuc <phucduc.bui@xxxxxxxxx>
---
sound/soc/codecs/wm8903.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c
index 320d7737699d..7c87e927836b 100644
--- a/sound/soc/codecs/wm8903.c
+++ b/sound/soc/codecs/wm8903.c
@@ -463,7 +463,7 @@ static int wm8903_put_deemph(struct snd_kcontrol *kcontrol,
if (deemph > 1)
return -EINVAL;

- mutex_lock(&wm8903->lock);
+ guard(mutex)(&wm8903->lock);
if (wm8903->deemph != deemph) {
wm8903->deemph = deemph;

@@ -471,7 +471,6 @@ static int wm8903_put_deemph(struct snd_kcontrol *kcontrol,

ret = 1;
}
- mutex_unlock(&wm8903->lock);

return ret;
}
--
2.43.0