5c1d6de7ae parent 085efd28b65582fac459359672421a1c479e7db1 author Axel Lin 1279864426 +0000 committer Mark Brown 1280817850 +0100 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 l@