Unverified Commit 5f342aee authored by Cezary Rojewski's avatar Cezary Rojewski Committed by Mark Brown
Browse files

ASoC: Intel: avs: Verify kcalloc() status when setting constraints



All memory operations shall be checked.

Fixes: f2f84746 ("ASoC: Intel: avs: Constrain path based on BE capabilities")
Reviewed-by: default avatarAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: default avatarCezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20250530141025.2942936-7-cezary.rojewski@intel.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 9e3285be
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -134,6 +134,8 @@ int avs_path_set_constraint(struct avs_dev *adev, struct avs_tplg_path_template
	rlist = kcalloc(i, sizeof(*rlist), GFP_KERNEL);
	clist = kcalloc(i, sizeof(*clist), GFP_KERNEL);
	slist = kcalloc(i, sizeof(*slist), GFP_KERNEL);
	if (!rlist || !clist || !slist)
		return -ENOMEM;

	i = 0;
	list_for_each_entry(path_template, &template->path_list, node) {