]> git.karo-electronics.de Git - mv-sheeva.git/commit
ASoC: Fix snd_soc_register_dais error handling
authorAxel Lin <axel.lin@gmail.com>
Wed, 3 Nov 2010 07:04:45 +0000 (15:04 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 3 Nov 2010 13:08:20 +0000 (09:08 -0400)
commitc46e0079cec40b49fbdb86a088cfd50b250fef47
treef63438e618de0262fd503b932cd10a6ca6685d46
parent29c798fecb9b846b363b0a02fa662ff42fc19426
ASoC: Fix snd_soc_register_dais error handling

kzalloc for dai may fail at any iteration of the for loop,
thus properly unregister already registered DAIs before return error.

The error handling code in snd_soc_register_dais() already ensure all the DAIs
are unregistered before return error, we can remove the error handling code
to unregister DAIs in snd_soc_register_codec().

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/soc-core.c