ASoC: wm8978: fix a memory leak if a wm8978_register fail
There is a memory leak found if wm8978_register() fail. This patch moves the buffer allocate and release at the same level to prevent the memory leak. Signed-off-by: NAxel Lin <axel.lin@gmail.com> Reviewed-by: NGuennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: NLiam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
Showing
想要评论请 注册 或 登录