Skip to content

Commit

Permalink
module-adapter: (cosmetic) use an existing error label
Browse files Browse the repository at this point in the history
Use goto to just to an existing error handling label instead of
freeing memory in place and returning.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
  • Loading branch information
lyakh authored and kv2019i committed Jan 9, 2024
1 parent 916f36b commit 23de2de
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/audio/module_adapter/module_adapter.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ struct comp_dev *module_adapter_new(const struct comp_driver *drv,
mod = rzalloc(zone, 0, SOF_MEM_CAPS_RAM, sizeof(*mod));
if (!mod) {
comp_err(dev, "module_adapter_new(), failed to allocate memory for module");
rfree(dev);
return NULL;
goto err;
}

dst = &mod->priv.cfg;
Expand Down

0 comments on commit 23de2de

Please sign in to comment.