Skip to content

Commit 5f342ae

Browse files
crojewsk-intelbroonie
authored andcommitted
ASoC: Intel: avs: Verify kcalloc() status when setting constraints
All memory operations shall be checked. Fixes: f2f8474 ("ASoC: Intel: avs: Constrain path based on BE capabilities") Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://patch.msgid.link/20250530141025.2942936-7-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 9e3285b commit 5f342ae

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sound/soc/intel/avs/path.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ int avs_path_set_constraint(struct avs_dev *adev, struct avs_tplg_path_template
134134
rlist = kcalloc(i, sizeof(*rlist), GFP_KERNEL);
135135
clist = kcalloc(i, sizeof(*clist), GFP_KERNEL);
136136
slist = kcalloc(i, sizeof(*slist), GFP_KERNEL);
137+
if (!rlist || !clist || !slist)
138+
return -ENOMEM;
137139

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

0 commit comments

Comments
 (0)