Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8a6cf30b authored by Manuel Lauss's avatar Manuel Lauss Committed by Mark Brown
Browse files

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: default avatarManuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
parent 97bf6af1
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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);