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

Commit 1bc80798 authored by Manuel Lauss's avatar Manuel Lauss Committed by Mark Brown
Browse files

ASoC: au1x: dbdma2: fix oops on soc device removal.



platform_device_unregister() frees resources for us, no need to
do it explicitly.  Fixes an oops when machine code removes the
soc-audio device.

Signed-off-by: default avatarManuel Lauss <manuel.lauss@gmail.com>
Acked-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent a649d1fc
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -488,12 +488,9 @@ EXPORT_SYMBOL_GPL(au1xpsc_pcm_add);

void au1xpsc_pcm_destroy(struct platform_device *dmapd)
{
	if (dmapd) {
		kfree(dmapd->resource);
		dmapd->resource = NULL;
	if (dmapd)
		platform_device_unregister(dmapd);
}
}
EXPORT_SYMBOL_GPL(au1xpsc_pcm_destroy);

MODULE_LICENSE("GPL");