ASoC: rockchip: Fix an error handling in 'rockchip_i2s_probe'
authorChristophe Jaillet <christophe.jaillet@wanadoo.fr>
Thu, 15 Jun 2017 05:53:11 +0000 (07:53 +0200)
committerMark Brown <broonie@kernel.org>
Thu, 15 Jun 2017 09:41:33 +0000 (10:41 +0100)
commitc3a3d3c41b74b05267bab6173f2a8224a1443ba6
treec333163208e4e9ab5179f6e26e78bce2e5c87492
parentec2212c4af20d84841ae288a397d8ee9ecec72a0
ASoC: rockchip: Fix an error handling in 'rockchip_i2s_probe'

If this memory allocation fail, we must disable what has been enabled.
Do not return immediately but go thrue the error handling path instead.

Also use 'devm_kmemdup' instead of 'devm_kzalloc+memcpy' to simplify code.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/rockchip/rockchip_i2s.c