Tag: 9bbe91a1ea4cae20ff9f8f175c92e1e49b4296d9

usb: dwc2: Use kmem_cache_free()

Author: Amitoj Kaur Chawla <amitoj1606@gmail.com> 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: // @@ 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) // Acked-by: John Youn Signed-off-by: Amitoj …

Continue reading