Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 46bec25d authored by Bo Shen's avatar Bo Shen Committed by Mark Brown
Browse files

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: default avatarBo Shen <voice.shen@atmel.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 6ce4eac1
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;