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-Tag: firefly_0821_release~9833^2~3479^2~15 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=efd9eb96d5604c2c133e500f7b8c7b3f3fbdece8;p=firefly-linux-kernel-4.4.55.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;