]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
ASoC: Intel: Skylake: Fix pipe memory allocation leak
authorDharageswari.R <dharageswari.r@intel.com>
Wed, 3 Feb 2016 12:29:47 +0000 (17:59 +0530)
committerMark Brown <broonie@kernel.org>
Thu, 4 Feb 2016 11:36:14 +0000 (11:36 +0000)
commit9ba8ffef9635c11102bc42d0f2d0a4213de273d5
treeae8aef06cfb9e4351a7d6dad5e8a6c079cfa4c74
parent7ca42f5ac5e0d8011086bcfa00e85aede42f0b78
ASoC: Intel: Skylake: Fix pipe memory allocation leak

We check and allocate pipeline resources in one shot. That causes
leaks if module creation fails later as that is not freed.

So split the resource allocation into two, first check if
resources are available and then add the resources upon
successful creation. So two new functions are added for checking
and current functions are re-purposed to only add the resources
for memory and MCPS.

Signed-off-by: Dharageswari.R <dharageswari.r@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/skylake/skl-topology.c