]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: da7210: fix a memory leak if failed to initialise da7210 audio codec
authorAxel Lin <axel.lin@gmail.com>
Fri, 23 Jul 2010 05:53:45 +0000 (05:53 +0000)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 3 Aug 2010 06:43:52 +0000 (07:43 +0100)
commita61aac9439fef9d6ff245d8be5f2bff3a60118f1
treee3c757bd4bacb91e164588d5c7af39ccd781cfa0
parent24b4a2571f84ed68de1adabeb281ad4c1636592a
ASoC: da7210: fix a memory leak if failed to initialise da7210 audio codec

da7210 should be kfreed if da7210_init() return error.
This patch also fixes the error handing in the case of snd_soc_register_dai()
fail by adding snd_soc_unregister_codec() in error path.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/codecs/da7210.c