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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Feb 2023 18:18:01 +0000 (19:18 +0100)
commit9f0d2c268488edaab80971db5c6321f088890678
tree356ca6a884a4f7aa6f33907d98bbdd7e359e7891
parent1a52ef89e3695191d9518647906f69bd6a5b76ff
ASoC: topology: Return -ENOMEM on memory allocation failure

[ Upstream commit c173ee5b2fa6195066674d66d1d7e191010fb1ff ]

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