Skip to content

Commit

Permalink
module_adapter: remove validate_config
Browse files Browse the repository at this point in the history
empty TODO for 4 years, no point in keeping it around. Also if you are
doing validation after trusting the data enough to do a memcpy you have
already lost.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
  • Loading branch information
cujomalainey committed Aug 21, 2024
1 parent c2d4bd3 commit 010fcbd
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/audio/module_adapter/module/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,6 @@ int module_load_config(struct comp_dev *dev, const void *cfg, size_t size)

ret = memcpy_s(dst->data, size, cfg, size);
assert(!ret);
ret = validate_config(dst->data);
if (ret) {
comp_err(dev, "module_load_config(): validation of config failed!");
ret = -EINVAL;
goto err;
}

/* Config loaded, mark it as valid */
dst->size = size;
Expand Down Expand Up @@ -190,12 +184,6 @@ int module_free_memory(struct processing_module *mod, void *ptr)
return -EINVAL;
}

static int validate_config(struct module_config *cfg)
{
/* TODO: validation of codec specific setup config */
return 0;
}

int module_prepare(struct processing_module *mod,
struct sof_source **sources, int num_of_sources,
struct sof_sink **sinks, int num_of_sinks)
Expand Down

0 comments on commit 010fcbd

Please sign in to comment.