[Patch v2 1/2] ASoC: atmel: sam9x5_wm8731: fix oops when unload module
Bo Shen
voice.shen at atmel.com
Wed Nov 27 05:05:09 EST 2013
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 at atmel.com>
---
Change in v2:
- using snd_soc_card_set_drvdata()
---
sound/soc/atmel/sam9x5_wm8731.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/soc/atmel/sam9x5_wm8731.c b/sound/soc/atmel/sam9x5_wm8731.c
index 992ae38..1b37228 100644
--- a/sound/soc/atmel/sam9x5_wm8731.c
+++ b/sound/soc/atmel/sam9x5_wm8731.c
@@ -97,6 +97,8 @@ static int sam9x5_wm8731_driver_probe(struct platform_device *pdev)
goto out;
}
+ snd_soc_card_set_drvdata(card, priv);
+
card->dev = &pdev->dev;
card->owner = THIS_MODULE;
card->dai_link = dai;
--
1.7.9.5
More information about the linux-arm-kernel
mailing list