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;
|
struct list_item *_mem_list;
|
||||||
|
|
||||||
if (!ptr) {
|
if (!ptr) {
|
||||||
comp_err(dev, "codec_free_memory: error: NULL pointer passed.");
|
return 0;
|
||||||
return -EINVAL;
|
|
||||||
}
|
}
|
||||||
/* Find which container keeps this memory */
|
/* Find which container keeps this memory */
|
||||||
list_for_item_safe(mem_list, _mem_list, &cd->codec.memory.mem_list) {
|
list_for_item_safe(mem_list, _mem_list, &cd->codec.memory.mem_list) {
|
||||||
|
|
Loading…
Reference in New Issue