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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Apr 2022 12:38:51 +0000 (14:38 +0200)
commitbc15442cc99f054f7b2703db147099b7fe6bba69
treeeb2bc473646629ffa3a1e0b91b2a60a98a2863ae
parentbc7d0133181e5f33ac33ca4f6bb2bce876c8ad88
ASoC: topology: Correct error handling in soc_tplg_dapm_widget_create()

[ Upstream commit 9c363532413cda3e2c6dfa10e5cca7cd221877a0 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/soc-topology.c