mirror of https://github.com/thesofproject/sof.git
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:
parent
3bc52f8a48
commit
cbf03f28be
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue