forked from luck/tmp_suning_uos_patched
ASoC: efika-audio-fabric: fix resource leak in efika_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
3b6bc354cb
commit
4e1f865097
|
@ -76,6 +76,7 @@ static __init int efika_fabric_init(void)
|
|||
rc = platform_device_add(pdev);
|
||||
if (rc) {
|
||||
pr_err("efika_fabric_init: platform_device_add() failed\n");
|
||||
platform_device_put(pdev);
|
||||
return -ENODEV;
|
||||
}
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue
Block a user