codec_adapter: don't error on free(NULL)

libc doesn't return a type, so it just no-ops silently on null, lets to
the same having this error makes walk back patterns more annoying

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
This commit is contained in:
Curtis Malainey 2021-02-19 13:06:58 -08:00 committed by Liam Girdwood
parent 3bc52f8a48
commit cbf03f28be
1 changed files with 1 additions and 2 deletions

View File

@ -182,8 +182,7 @@ int codec_free_memory(struct comp_dev *dev, void *ptr)
struct list_item *_mem_list;
if (!ptr) {
comp_err(dev, "codec_free_memory: error: NULL pointer passed.");
return -EINVAL;
return 0;
}
/* Find which container keeps this memory */
list_for_item_safe(mem_list, _mem_list, &cd->codec.memory.mem_list) {