cxgb3: use kvfree() in cxgb_free_mem()
authorPekka Enberg <penberg@kernel.org>
Tue, 30 Jun 2015 21:59:09 +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: Santosh Raspatur <santosh@chelsio.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c

index b0cbb2b7fd484f95ec36574feef7981753a552e9..76684dcb874cf90bf3d4ecd56a0ab2a200d4a974 100644 (file)
@@ -1169,10 +1169,7 @@ void *cxgb_alloc_mem(unsigned long size)
  */
 void cxgb_free_mem(void *addr)
 {
-       if (is_vmalloc_addr(addr))
-               vfree(addr);
-       else
-               kfree(addr);
+       kvfree(addr);
 }
 
 /*