From: Geliang Tang Date: Mon, 21 Sep 2015 11:43:05 +0000 (-0700) Subject: IB/hfi1: use kvfree() in sdma.c X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=60f57ec2da398a7c1f56dc2ac690ef75b17d2399;p=openwrt%2Fstaging%2Fblogic.git IB/hfi1: use kvfree() in sdma.c Use kvfree() instead of open-coding it. Signed-off-by: Geliang Tang Acked-by: Mike Marciniszyn Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rdma/hfi1/sdma.c b/drivers/staging/rdma/hfi1/sdma.c index aecd1a74741c..9c02a3d23700 100644 --- a/drivers/staging/rdma/hfi1/sdma.c +++ b/drivers/staging/rdma/hfi1/sdma.c @@ -966,10 +966,7 @@ static void sdma_clean(struct hfi1_devdata *dd, size_t num_engines) sde->descq = NULL; sde->descq_phys = 0; } - if (is_vmalloc_addr(sde->tx_ring)) - vfree(sde->tx_ring); - else - kfree(sde->tx_ring); + kvfree(sde->tx_ring); sde->tx_ring = NULL; } spin_lock_irq(&dd->sde_map_lock);