Skip to content
Commit d484366b authored by Axel Lin's avatar Axel Lin Committed by Mark Brown
Browse files

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: default avatarAxel Lin <axel.lin@gmail.com>
Reviewed-by: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 4eaac505
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment