ASoC: don't leak on error in snd_dmaengine_pcm_register
authorStephen Warren <swarren@nvidia.com>
Tue, 3 Dec 2013 21:26:33 +0000 (14:26 -0700)
committerMark Brown <broonie@linaro.org>
Mon, 9 Dec 2013 18:43:06 +0000 (18:43 +0000)
commit6b9f3e65282b3bd7ed77e7b2b1edfe7cfed48115
tree34c6cb37ce036b9f7af4e3479a2f9b9e4dab147e
parent6ce4eac1f600b34f2f7f58f9cd8f0503d79e42ae
ASoC: don't leak on error in snd_dmaengine_pcm_register

If snd_dmaengine_pcm_register()'s call to snd_soc_add_platform() fails,
all objects allocated during registration are leaked. Fix this by adding
error-handling code.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/soc-generic-dmaengine-pcm.c