Commit d2fcb548 authored by Pekka Enberg's avatar Pekka Enberg Committed by Linus Torvalds

cxgb4: use kvfree() in t4_free_mem()

Use kvfree() instead of open-coding it.
Signed-off-by: default avatarPekka Enberg <penberg@kernel.org>
Cc: Hariprasad S <hariprasad@chelsio.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 68c61b93
...@@ -1150,10 +1150,7 @@ void *t4_alloc_mem(size_t size) ...@@ -1150,10 +1150,7 @@ void *t4_alloc_mem(size_t size)
*/ */
void t4_free_mem(void *addr) void t4_free_mem(void *addr)
{ {
if (is_vmalloc_addr(addr)) kvfree(addr);
vfree(addr);
else
kfree(addr);
} }
/* Send a Work Request to write the filter at a specified index. We construct /* Send a Work Request to write the filter at a specified index. We construct
......
Markdown is supported
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