Skip to content

Commit fce00cd

Browse files
author
Jyri Sarha
committed
Audio: Selector: Memory, blob, and fast_get allocs to module API
Allocate all memory, blob handlers, and fast_get() buffers through module API mod_alloc() and friends and remove all redundant rfree(), comp_data_blob_handler_free(), and fast_put() calls from module unload functions and init error branches. The IPC3 implementation of selector uses the component interface directly and can not use the new module API. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
1 parent f69470d commit fce00cd

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

src/audio/selector/selector.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ static int selector_init(struct processing_module *mod)
613613
return -EINVAL;
614614
}
615615

616-
cd = rzalloc(SOF_MEM_FLAG_USER, sizeof(*cd));
616+
cd = mod_zalloc(mod, sizeof(*cd));
617617
if (!cd)
618618
return -ENOMEM;
619619

@@ -729,12 +729,8 @@ static int selector_verify_params(struct processing_module *mod,
729729
*/
730730
static int selector_free(struct processing_module *mod)
731731
{
732-
struct comp_data *cd = module_get_private_data(mod);
733-
734732
comp_dbg(mod->dev, "selector_free()");
735733

736-
rfree(cd);
737-
738734
return 0;
739735
}
740736

0 commit comments

Comments
 (0)