]> git.baikalelectronics.ru Git - 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)
commitc0c8407d0b2dbacba350b71ed96462f2bfef4e12
treeae8aef06cfb9e4351a7d6dad5e8a6c079cfa4c74
parent0f77276162b729db89f8d1267a224149414da528
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