diff options
author | Geliang Tang <geliangtang@163.com> | 2015-09-21 11:43:05 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-09-29 01:42:27 (GMT) |
commit | 60f57ec2da398a7c1f56dc2ac690ef75b17d2399 (patch) | |
tree | c94f2a26784984452a328bd80b697f071ef2500e /drivers/staging/rdma/hfi1 | |
parent | 49c3203707c9feebee26fec02f67b0431ac0a72a (diff) | |
download | linux-60f57ec2da398a7c1f56dc2ac690ef75b17d2399.tar.xz |
IB/hfi1: use kvfree() in sdma.c
Use kvfree() instead of open-coding it.
Signed-off-by: Geliang Tang <geliangtang@163.com>
Acked-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rdma/hfi1')
-rw-r--r-- | drivers/staging/rdma/hfi1/sdma.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/staging/rdma/hfi1/sdma.c b/drivers/staging/rdma/hfi1/sdma.c index aecd1a7..9c02a3d 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); |