From: Axel Lin Date: Fri, 23 Jul 2010 05:53:46 +0000 (+0000) Subject: ASoC: wm8523: fix resource reclaim in wm8523_register error path X-Git-Tag: v2.6.36-rc1~493^2~1^2~9 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ef99e9b5a10086bcc529e6c0a11c6539caee8cd1;p=pandora-kernel.git ASoC: wm8523: fix resource reclaim in wm8523_register error path This patch includes below fixes: 1. If another WM8523 is registered, need to kfree wm8523 before return -EINVAL. 2. If snd_soc_register_codec failed, goto error path to properly free resources. 3. Instead of using mixed in-line and goto style cleanup, use goto style error handling if snd_soc_register_dai failed. Signed-off-by: Axel Lin Acked-by: Liam Girdwood Signed-off-by: Mark Brown --- Reading git-diff-tree failed