From: Manuel Lauss <manuel.lauss@gmail.com>
To: alsa-devel@alsa-project.org
Cc: Manuel Lauss <manuel.lauss@gmail.com>
Subject: [PATCH] ASoC: wm8731: init mutex in i2c init path
Date: Mon, 19 Jan 2015 08:23:43 +0100 [thread overview]
Message-ID: <1421652223-721475-1-git-send-email-manuel.lauss@gmail.com> (raw)
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>
---
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(+)
diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c
index b9211b4..b115ed8 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);
--
2.2.1
next reply other threads:[~2015-01-19 7:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-19 7:23 Manuel Lauss [this message]
2015-01-27 18:21 ` [PATCH] ASoC: wm8731: init mutex in i2c init path Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1421652223-721475-1-git-send-email-manuel.lauss@gmail.com \
--to=manuel.lauss@gmail.com \
--cc=alsa-devel@alsa-project.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).