From: Manuel Lauss Date: Tue, 1 Dec 2009 17:10:35 +0000 (+0100) Subject: ASoC: au1x: dbdma2: plug memleak in pcm device creation error path X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=efd9eb96d5604c2c133e500f7b8c7b3f3fbdece8;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git ASoC: au1x: dbdma2: plug memleak in pcm device creation error path free the allocated pcm platform device in the error path. Signed-off-by: Manuel Lauss Acked-by: Liam Girdwood Signed-off-by: Mark Brown --- diff --git a/sound/soc/au1x/dbdma2.c b/sound/soc/au1x/dbdma2.c index 2ca33b09a867..19e4d37eba1c 100644 --- a/sound/soc/au1x/dbdma2.c +++ b/sound/soc/au1x/dbdma2.c @@ -480,6 +480,7 @@ struct platform_device *au1xpsc_pcm_add(struct platform_device *pdev) if (!ret) return pd; + platform_device_put(pd); out: kfree(res); return NULL;