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@xxxxxxxxx> --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-sound" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
- Follow-Ups:
- Re: [PATCH 1/2] ASoC: atmel: sam9x5_wm8731: fix oops when unload module
- From: Mark Brown
- Re: [PATCH 1/2] ASoC: atmel: sam9x5_wm8731: fix oops when unload module
- From: Richard Genoud
- [PATCH 2/2] ASoC: atmel: sam9x5_wm8731: remove platform_set_drvdata
- From: Bo Shen
- Re: [PATCH 1/2] ASoC: atmel: sam9x5_wm8731: fix oops when unload module
- Prev by Date: Re: Cannot load snd-usb-audio on 3.12-rc2
- Next by Date: [PATCH 2/2] ASoC: atmel: sam9x5_wm8731: remove platform_set_drvdata
- Previous by thread: Re: Cannot load snd-usb-audio on 3.12-rc2
- Next by thread: [PATCH 2/2] ASoC: atmel: sam9x5_wm8731: remove platform_set_drvdata
- Index(es):
![]() |