From: Pekka Enberg Date: Tue, 30 Jun 2015 21:59:12 +0000 (-0700) Subject: cxgb4: use kvfree() in t4_free_mem() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d2fcb5486af754c990f9a11f91195e28ffd4c735;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git cxgb4: use kvfree() in t4_free_mem() Use kvfree() instead of open-coding it. Signed-off-by: Pekka Enberg Cc: Hariprasad S Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c index c64b5a99bfef..351f3b1bf800 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +++ b/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) { - 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