forked from Minki/linux
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: Manuel Lauss <manuel.lauss@gmail.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
parent
a649d1fcc9
commit
1bc8079879
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user