mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-14 15:54:15 +08:00
ASoC: pcm030-audio-fabric: fix resource leak in pcm030_fabric_init error path
Add missing platform_device_put() if platform_device_add() failed. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
parent
4e1f865097
commit
917dac0ff1
@ -76,6 +76,7 @@ static __init int pcm030_fabric_init(void)
|
||||
rc = platform_device_add(pdev);
|
||||
if (rc) {
|
||||
pr_err("pcm030_fabric_init: platform_device_add() failed\n");
|
||||
platform_device_put(pdev);
|
||||
return -ENODEV;
|
||||
}
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user