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-Url: https://git.stricted.de/?a=commitdiff_plain;h=46bec25da6a41b7308adde746cbcdbbd0bf9b39c;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.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 992ae38d5a15..1b372283bd01 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;