From: Manuel Lauss Date: Mon, 19 Jan 2015 07:23:43 +0000 (+0100) Subject: ASoC: wm8731: init mutex in i2c init path X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8a6cf30bf93df2c0f2637156e4a5070594bddebf;p=linux-beck.git 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. Signed-off-by: Manuel Lauss Signed-off-by: Mark Brown Cc: stable@vger.kernel.org --- diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c index b9211b42f6e9..b115ed815db9 100644 --- a/sound/soc/codecs/wm8731.c +++ b/sound/soc/codecs/wm8731.c @@ -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);