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: accepted/tizen/common/20141203.182822~641^2~13^2^4~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=46bec25da6a41b7308adde746cbcdbbd0bf9b39c;p=platform%2Fkernel%2Flinux-arm64.git 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 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;