]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
ASoC: zx296702-i2s: Fix resource leak when unload module
authorAxel Lin <axel.lin@ingics.com>
Sat, 29 Aug 2015 15:09:30 +0000 (23:09 +0800)
committerMark Brown <broonie@kernel.org>
Sun, 30 Aug 2015 14:47:54 +0000 (15:47 +0100)
commit534dcd7ea60cebc41816eff0c290700acb2cc43e
tree840e2f87ac1b876a4b21652b51d2c5cef1e9ff35
parentbc0195aad0daa2ad5b0d76cce22b167bc3435590
ASoC: zx296702-i2s: Fix resource leak when unload module

Use devm_* API to fix leaks in current code.
1. Use devm_kzalloc to fix memory leak for zx_i2s when unload the module.
2. Use devm_snd_soc_register_component to ensure component is unregistered
   when unload the module.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Reviewed-by: Jun Nie <jun.nie@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/zte/zx296702-i2s.c