瀏覽代碼

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 <manuel.lauss@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Manuel Lauss 15 年之前
父節點
當前提交
efd9eb96d5
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      sound/soc/au1x/dbdma2.c

+ 1 - 0
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;