[alsa-devel] [PATCH 1/2] ASoC: au1x: dbdma2: fix oops on soc device removal.

Manuel Lauss manuel.lauss at googlemail.com
Tue Dec 1 18:10:34 CET 2009


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 at gmail.com>
---
 sound/soc/au1x/dbdma2.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/sound/soc/au1x/dbdma2.c b/sound/soc/au1x/dbdma2.c
index b8965d9..148e205 100644
--- a/sound/soc/au1x/dbdma2.c
+++ b/sound/soc/au1x/dbdma2.c
@@ -486,11 +486,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);
 
-- 
1.6.5.3



More information about the Alsa-devel mailing list