From: Bo Shen Date: Wed, 27 Nov 2013 10:05:09 +0000 (+0800) Subject: ASoC: atmel: sam9x5_wm8731: fix oops when unload module X-Git-Tag: v3.13-rc3~12^2~1^2^3 X-Git-Url: http://pileus.org/git/?a=commitdiff_plain;h=46bec25da6a41b7308adde746cbcdbbd0bf9b39c;p=~andy%2Flinux ASoC: atmel: sam9x5_wm8731: fix oops when unload module 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 Signed-off-by: Mark Brown --- diff --git a/sound/soc/atmel/sam9x5_wm8731.c b/sound/soc/atmel/sam9x5_wm8731.c index 992ae38d5a1..1b372283bd0 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;