]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
cxgb4: use kvfree() in t4_free_mem()
authorPekka Enberg <penberg@kernel.org>
Tue, 30 Jun 2015 21:59:12 +0000 (14:59 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 1 Jul 2015 02:44:59 +0000 (19:44 -0700)
Use kvfree() instead of open-coding it.

Signed-off-by: Pekka Enberg <penberg@kernel.org>
Cc: Hariprasad S <hariprasad@chelsio.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c

index c64b5a99bfef0eb04c3f6de63b3ac8d7842345b5..351f3b1bf80025167c9afcc226252ec923a639b1 100644 (file)
@@ -1150,10 +1150,7 @@ void *t4_alloc_mem(size_t size)
  */
 void t4_free_mem(void *addr)
 {
-       if (is_vmalloc_addr(addr))
-               vfree(addr);
-       else
-               kfree(addr);
+       kvfree(addr);
 }
 
 /* Send a Work Request to write the filter at a specified index.  We construct