From: Pekka Enberg Date: Tue, 30 Jun 2015 21:59:09 +0000 (-0700) Subject: cxgb3: use kvfree() in cxgb_free_mem() X-Git-Tag: v5.15~15510^2~19 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=68c61b93e89fef36a36086c4e686fe413d2caab7;p=platform%2Fkernel%2Flinux-starfive.git cxgb3: use kvfree() in cxgb_free_mem() Use kvfree() instead of open-coding it. Signed-off-by: Pekka Enberg Cc: Santosh Raspatur Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c index b0cbb2b7fd48..76684dcb874c 100644 --- a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c +++ b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c @@ -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); } /*