linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ASoC: atmel: sam9x5_wm8731: fix oops when unload module
@ 2013-11-26  4:17 Bo Shen
  2013-11-26  4:17 ` [PATCH 2/2] ASoC: atmel: sam9x5_wm8731: remove platform_set_drvdata Bo Shen
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Bo Shen @ 2013-11-26  4:17 UTC (permalink / raw)
  To: linux-arm-kernel

As the priv is not assigned to card->drvdata, it is NULL, so when
unload module, it will cause NULL pointer oops.
Assign priv to card->drvdata to fix this issue.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
---
 sound/soc/atmel/sam9x5_wm8731.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/atmel/sam9x5_wm8731.c b/sound/soc/atmel/sam9x5_wm8731.c
index 992ae38..6dc33ac 100644
--- a/sound/soc/atmel/sam9x5_wm8731.c
+++ b/sound/soc/atmel/sam9x5_wm8731.c
@@ -99,6 +99,7 @@ static int sam9x5_wm8731_driver_probe(struct platform_device *pdev)
 
 	card->dev = &pdev->dev;
 	card->owner = THIS_MODULE;
+	card->drvdata = priv;
 	card->dai_link = dai;
 	card->num_links = 1;
 	card->dapm_widgets = sam9x5_dapm_widgets;
-- 
1.7.9.5

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

end of thread, other threads:[~2013-11-29 14:59 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-26  4:17 [PATCH 1/2] ASoC: atmel: sam9x5_wm8731: fix oops when unload module Bo Shen
2013-11-26  4:17 ` [PATCH 2/2] ASoC: atmel: sam9x5_wm8731: remove platform_set_drvdata Bo Shen
2013-11-26 11:42   ` Richard Genoud
2013-11-26 11:32 ` [PATCH 1/2] ASoC: atmel: sam9x5_wm8731: fix oops when unload module Richard Genoud
2013-11-27  1:13   ` Bo Shen
2013-11-27 10:09     ` Richard Genoud
2013-11-28  1:20       ` Bo Shen
2013-11-29 14:59         ` Richard Genoud
2013-11-26 13:22 ` Mark Brown
2013-11-27  1:16   ` Bo Shen

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