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 <[email protected]> Signed-off-by: Cezary Rojewski <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
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)