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

Commit f5ede8dc authored by Richard Fitzgerald's avatar Richard Fitzgerald Committed by Mark Brown
Browse files

ASoC: wm5110: Unregister compressed platform when driver is removed



The driver was not unregistering the compressed platform in
wm5110_remove(). If the codec is built as a module, this would
lead to a NULL pointer deref if the module was unloaded and then
re-probed.

Signed-off-by: default avatarRichard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 822ad70a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2358,6 +2358,7 @@ static int wm5110_probe(struct platform_device *pdev)

static int wm5110_remove(struct platform_device *pdev)
{
	snd_soc_unregister_platform(&pdev->dev);
	snd_soc_unregister_codec(&pdev->dev);
	pm_runtime_disable(&pdev->dev);