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

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
......@@ -488,11 +488,8 @@ 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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment