Skip to content
Commit 9bbe91a1 authored by Amitoj Kaur Chawla's avatar Amitoj Kaur Chawla Committed by Felipe Balbi
Browse files

usb: dwc2: Use kmem_cache_free()



Here, free memory is allocated using kmem_cache_zalloc.  So, use
kmem_cache_free instead of kfree.

This is done using Coccinelle and semantic patch used
is as follows:

//<smpl>
@@
expression x,E,c;
@@
 x =
\(kmem_cache_alloc\|kmem_cache_zalloc\|kmem_cache_alloc_node\)(c,...)
 ... when != x = E
     when != &x
?-kfree(x)
+kmem_cache_free(c,x)
//</smpl>

Acked-by: default avatarJohn Youn <johnyoun@synopsys.com>
Signed-off-by: default avatarAmitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: default avatarFelipe Balbi <balbi@kernel.org>
parent 1479cb69
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment