瀏覽代碼

cxgb4: use kvfree() in t4_free_mem()

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>
Pekka Enberg 10 年之前
父節點
當前提交
d2fcb5486a
共有 1 個文件被更改,包括 1 次插入4 次删除
  1. 1 4
      drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c

+ 1 - 4
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c

@@ -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))
-		vfree(addr);
-	else
-		kfree(addr);
+	kvfree(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