From 1bc8079879e8edfff451b62b7550bdd18523f963 Mon Sep 17 00:00:00 2001 From: Manuel Lauss Date: Tue, 1 Dec 2009 18:10:34 +0100 Subject: 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 Acked-by: Liam Girdwood Signed-off-by: Mark Brown --- sound/soc/au1x/dbdma2.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sound/soc/au1x/dbdma2.c b/sound/soc/au1x/dbdma2.c index fe9f4657c95..2ca33b09a86 100644 --- a/sound/soc/au1x/dbdma2.c +++ b/sound/soc/au1x/dbdma2.c @@ -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); -- cgit v1.2.3