Skip to contentSkip to conversation

ASoC: wm8731: init mutex in i2c init path

PATCH Applied Manuel Lauss 2 participants 2 messages Jan 19, 2015 – Jan 27, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: wm8731: init mutex in i2c init path

The I2C init path forgot to init the mutex, leading to an oops when controls are accessed.

---
Fixes an oops on bootup when alsactl tries to restore codec parameters on my MIPS DB1300 board.

 sound/soc/codecs/wm8731.c | 2 ++
 1 file changed, 2 insertions(+)
sound/soc/codecs/wm8731.c +2 -0
index b9211b4..b115ed8 100644
@@ -717,6 +717,8 @@ static int wm8731_i2c_probe(struct i2c_client *i2c,
 	if (wm8731 == NULL)
 		return -ENOMEM;
 
+	mutex_init(&wm8731->lock);
+
 	wm8731->regmap = devm_regmap_init_i2c(i2c, &wm8731_regmap);
 	if (IS_ERR(wm8731->regmap)) {
 		ret = PTR_ERR(wm8731->regmap);
Signature · 1 line
2.2.1
maintainer Applied
#1 lore raw
Quoted 2 lines · Manuel Lauss

The I2C init path forgot to init the mutex, leading to an oops when controls are accessed.

Applied, thanks. Please remember to CC maintainers on patches, including driver maintainers as well as subsystem maintainers.