ASoC: topology: Return -ENOMEM on memory allocation failure
authorAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Tue, 7 Feb 2023 21:04:28 +0000 (22:04 +0100)
committerMark Brown <broonie@kernel.org>
Tue, 7 Feb 2023 14:06:26 +0000 (14:06 +0000)
commitc173ee5b2fa6195066674d66d1d7e191010fb1ff
tree9086bd67b53c8dc6de7a9e36c3413cf380c28fba
parent29aab38823b61e482995c24644bd2d8acfe56185
ASoC: topology: Return -ENOMEM on memory allocation failure

When handling error path, ret needs to be set to correct value.

Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <error27@gmail.com>
Fixes: d29d41e28eea ("ASoC: topology: Add support for multiple kcontrol types to a widget")
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20230207210428.2076354-1-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-topology.c