aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Lauss <manuel.lauss@gmail.com>2015-01-19 02:23:43 -0500
committerMark Brown <broonie@kernel.org>2015-01-27 13:21:26 -0500
commit8a6cf30bf93df2c0f2637156e4a5070594bddebf (patch)
tree462c7752fbb8fb939477765cef9601198e1e753b
parent97bf6af1f928216fd6c5a66e8a57bfa95a659672 (diff)
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 <manuel.lauss@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
-rw-r--r--sound/soc/codecs/wm8731.c2
1 files changed, 2 insertions, 0 deletions
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,
717 if (wm8731 == NULL) 717 if (wm8731 == NULL)
718 return -ENOMEM; 718 return -ENOMEM;
719 719
720 mutex_init(&wm8731->lock);
721
720 wm8731->regmap = devm_regmap_init_i2c(i2c, &wm8731_regmap); 722 wm8731->regmap = devm_regmap_init_i2c(i2c, &wm8731_regmap);
721 if (IS_ERR(wm8731->regmap)) { 723 if (IS_ERR(wm8731->regmap)) {
722 ret = PTR_ERR(wm8731->regmap); 724 ret = PTR_ERR(wm8731->regmap);