[alsa-devel] [PATCH 0/2] ASoC: au1x updates for 2.6.33
Hi Mark,
The following two patches fix 2 issues in the updated au1x asoc drivers in your/Takashis queue for 2.6.33. If possible, please either fold them into commit 0f83d639d84c99a775c60696dbde77372c2cf4ac ("au1x: convert to platform drivers") found in Takashi's tree.
Thank you! Manuel Lauss
Manuel Lauss (2): ASoC: au1x: dbdma2: fix oops on soc device removal. ASoC: au1x: dbdma2: plug memleak in pcm device creation error path
sound/soc/au1x/dbdma2.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-)
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 --- 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);
free the allocated pcm platform device in the error path.
Signed-off-by: Manuel Lauss manuel.lauss@gmail.com --- sound/soc/au1x/dbdma2.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/sound/soc/au1x/dbdma2.c b/sound/soc/au1x/dbdma2.c index 148e205..6d9f4c6 100644 --- a/sound/soc/au1x/dbdma2.c +++ b/sound/soc/au1x/dbdma2.c @@ -478,6 +478,7 @@ struct platform_device *au1xpsc_pcm_add(struct platform_device *pdev) if (!ret) return pd;
+ platform_device_put(pd); out: kfree(res); return NULL;
On Tue, Dec 01, 2009 at 06:10:33PM +0100, Manuel Lauss wrote:
The following two patches fix 2 issues in the updated au1x asoc drivers in your/Takashis queue for 2.6.33. If possible, please either fold them into commit 0f83d639d84c99a775c60696dbde77372c2cf4ac ("au1x: convert to platform drivers") found in Takashi's tree.
Applied both, thanks.
participants (2)
-
Manuel Lauss
-
Mark Brown