IB/hfi1: use kvfree() in sdma.c
authorGeliang Tang <geliangtang@163.com>
Mon, 21 Sep 2015 11:43:05 +0000 (04:43 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Sep 2015 01:42:27 +0000 (03:42 +0200)
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>
drivers/staging/rdma/hfi1/sdma.c

index aecd1a74741c656897f9f4ba367892c2a214e7fa..9c02a3d2370024680d7205e30fe5a39681eb0044 100644 (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);