Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/audio/module_adapter/module/volume/volume.c
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,12 @@ static int volume_init(struct processing_module *mod)
const size_t vol_size = sizeof(int32_t) * SOF_IPC_MAX_CHANNELS * 4;
int i;

if (!vol || cfg->size != sizeof(*vol)) {
comp_err(dev, "volume_init(): No configuration data or bad data size %u",
cfg->size);
return -EINVAL;
}

cd = rzalloc(SOF_MEM_ZONE_RUNTIME, 0, SOF_MEM_CAPS_RAM, sizeof(struct vol_data));
if (!cd)
return -ENOMEM;
Expand Down