ASoC: topology: Correct error handling in soc_tplg_dapm_widget_create()
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Thu, 31 Mar 2022 11:49:57 +0000 (14:49 +0300)
committerMark Brown <broonie@kernel.org>
Mon, 4 Apr 2022 13:25:36 +0000 (14:25 +0100)
commit9c363532413cda3e2c6dfa10e5cca7cd221877a0
tree926d5c1af291900f9b12c0856207370a26c51fc7
parentc775cbf62ed4911e4f0f23880f01815753123690
ASoC: topology: Correct error handling in soc_tplg_dapm_widget_create()

Academic correction of error handling:
In case the allocation of kc or kcontrol_type fails the correct label to
jump is hdr_err since the template.sname has been also allocated at this
point.

Fixes: d29d41e28eea6 ("ASoC: topology: Add support for multiple kcontrol types to a widget")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220331114957.519-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-topology.c