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>
This commit is contained in:
Geliang Tang 2015-09-21 04:43:05 -07:00 committed by Greg Kroah-Hartman
parent 49c3203707
commit 60f57ec2da

View File

@ -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);