linux_dsm_epyc7002/sound/soc/sof
Dragos Tarcatu 1b4efdaf6d
ASoC: SOF: topology: free kcontrol memory on error
The volume and bytes kcontrols are currently not freeing their
memory on initialization failures. When an error occurs, all the
widgets loaded so far are unloaded via sof_widget_unload().
But this only happens for the widgets that got successfully loaded.

Fix that by kfree()-ing the allocated memory on load error.

Fixes: 311ce4fe76 ("ASoC: SOF: Add support for loading topologies")
Reviewed-by: Paul Olaru <paul.olaru@nxp.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Dragos Tarcatu <dragos_tarcatu@mentor.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20191111222039.19651-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-11-12 17:12:27 +00:00
..
imx ASoC: SOF: imx: fix reverse CONFIG_SND_SOC_SOF_OF dependency 2019-11-04 13:24:02 +00:00
intel ASoC: SOF: Intel: hda: use fallback for firmware name 2019-11-12 12:09:54 +00:00
xtensa sound fixes for 5.2-rc5 2019-06-14 05:37:06 -10:00
control.c Merge branch 'for-5.4' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.5 2019-11-06 16:29:34 +00:00
core.c ASoC: SOF: add helper to check if we should enter d0i3 suspend 2019-11-12 12:10:40 +00:00
debug.c Merge branch 'for-5.4' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.5 2019-11-06 16:29:34 +00:00
ipc.c Merge branch 'for-5.4' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.5 2019-11-06 16:29:34 +00:00
Kconfig ASoC: SOF: Intel: use def_tristate, avoid using select 2019-11-04 13:24:14 +00:00
loader.c ASoC: SOF: loader: fix kernel oops on firmware boot failure 2019-10-01 18:30:28 +01:00
Makefile ASoC: SOF: imx: Add i.MX8 HW support 2019-08-22 18:28:32 +01:00
nocodec.c ASoC: sof: use modern dai_link style 2019-06-06 22:10:38 +01:00
ops.c ASoC: SOF: Fix a compile warning with CONFIG_PCI=n 2019-05-07 11:23:57 +09:00
ops.h ASoC: SOF: return -ENOTSUPP if D0I3 is not supported 2019-10-28 14:46:21 +00:00
pcm.c ASoC: SOF: ignore suspend/resume for D0ix compatible streams 2019-10-28 14:45:53 +00:00
pm.c ASoC: SOF: PM: only suspend to D0I3 when needed 2019-11-12 12:10:59 +00:00
sof-acpi-dev.c ASoC: SOF: acpi: add debug module param 2019-10-10 15:15:11 +01:00
sof-of-dev.c ASoC: SOF: Add OF DSP device support 2019-08-22 18:28:20 +01:00
sof-pci-dev.c ASoC: SOF - remove the dead code (skylake/kabylake) 2019-10-29 12:30:02 +00:00
sof-priv.h ASoC: SOF: add helper to check if we should enter d0i3 suspend 2019-11-12 12:10:40 +00:00
topology.c ASoC: SOF: topology: free kcontrol memory on error 2019-11-12 17:12:27 +00:00
trace.c ASoC: SOF: trace: move to opt-in with Kconfig and module parameter 2019-10-01 18:34:06 +01:00
utils.c ASoC: SOF: Add utils 2019-04-28 02:49:47 +09:00