alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: mc13783: Provide codec->control_data
@ 2012-07-26 18:29 Fabio Estevam
  2012-07-26 20:36 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Fabio Estevam @ 2012-07-26 18:29 UTC (permalink / raw)
  To: broonie; +Cc: Fabio Estevam, philippe.retornaz, alsa-devel, lee.jones, kernel

If codec->control_data is not provided, the following crash happens:

Unable to handle kernel NULL pointer dereference at virtual address 00000078
pgd = 80004000
[00000078] *pgd=00000000
Internal error: Oops: 5 [#1] SMP ARM
Modules linked in:
CPU: 0    Tainted: G        W     (3.5.0-next-20120725+ #1263)
PC is at regmap_read+0x18/0x64
LR is at hw_read+0x50/0x98
pc : [<802bcd90>]    lr : [<803cad18>]    psr: 60000013
...

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 sound/soc/codecs/mc13783.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/sound/soc/codecs/mc13783.c b/sound/soc/codecs/mc13783.c
index 6276e35..c8251af 100644
--- a/sound/soc/codecs/mc13783.c
+++ b/sound/soc/codecs/mc13783.c
@@ -581,6 +581,8 @@ static int mc13783_probe(struct snd_soc_codec *codec)
 {
 	struct mc13783_priv *priv = snd_soc_codec_get_drvdata(codec);
 
+	codec->control_data = priv->mc13xxx;
+
 	mc13xxx_lock(priv->mc13xxx);
 
 	/* these are the reset values */
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ASoC: mc13783: Provide codec->control_data
  2012-07-26 18:29 [PATCH] ASoC: mc13783: Provide codec->control_data Fabio Estevam
@ 2012-07-26 20:36 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2012-07-26 20:36 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: philippe.retornaz, alsa-devel, lee.jones, kernel


[-- Attachment #1.1: Type: text/plain, Size: 152 bytes --]

On Thu, Jul 26, 2012 at 03:29:03PM -0300, Fabio Estevam wrote:
> If codec->control_data is not provided, the following crash happens:

Applied, thanks!

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-07-26 20:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-26 18:29 [PATCH] ASoC: mc13783: Provide codec->control_data Fabio Estevam
2012-07-26 20:36 ` Mark Brown

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).