ASoC: au1x: dbdma2: fix oops on soc device removal.
authorManuel Lauss <manuel.lauss@googlemail.com>
Tue, 1 Dec 2009 17:10:34 +0000 (18:10 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 3 Dec 2009 10:49:55 +0000 (10:49 +0000)
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>
sound/soc/au1x/dbdma2.c

index fe9f4657c959bd1e1b9ed1b4bd45adadba0f421b..2ca33b09a86784b883ef54124fb786d6f2c0546f 100644 (file)
@@ -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);