Skip to content

Commit

Permalink
ASoC: atmel: sam9x5_wm8731: fix oops when unload module
Browse files Browse the repository at this point in the history
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@atmel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Bo Shen authored and Mark Brown committed Nov 27, 2013
1 parent 6ce4eac commit 46bec25
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sound/soc/atmel/sam9x5_wm8731.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 46bec25

Please sign in to comment.