ASoC: wm8904: fix resource reclaim in wm8904_register error path
authorAxel Lin <axel.lin@gmail.com>
Fri, 23 Jul 2010 05:53:48 +0000 (05:53 +0000)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 3 Aug 2010 06:45:00 +0000 (07:45 +0100)
commit62f5ad6733b872e14d671b615850eb5bd1cd7e30
tree95371314dedc70e7f870a2621765c5f1cc9027a1
parent2c2749de118bd36645b3a4a56f0d8ef6d4fd09cf
ASoC: wm8904: fix resource reclaim in wm8904_register error path

This patch includes below fixes:
1. wm8904 need to be kfreed in wm8904_register() error path before return.
2. fix the error path for snd_soc_register_codec() fail and
   snd_soc_register_dai() fail to properly free resources.

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/wm8904.c