power/perf/hv-24x7: Use kmem_cache_free() instead of kfree
authorSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Wed, 10 Dec 2014 06:43:34 +0000 (01:43 -0500)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 12 Dec 2014 05:06:13 +0000 (16:06 +1100)
Use kmem_cache_free() to free a buffer allocated with kmem_cache_alloc().

Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/perf/hv-24x7.c

index d073e0679a0c2539eb9755ebaf7117eeb65fda47..f162d0b8eea380c6f00e026355309426fba4a229 100644 (file)
@@ -177,7 +177,7 @@ static ssize_t _name##_show(struct device *dev,                     \
        }                                                       \
        ret = sprintf(buf, _fmt, _expr);                        \
 e_free:                                                                \
-       kfree(page);                                            \
+       kmem_cache_free(hv_page_cache, page);                   \
        return ret;                                             \
 }                                                              \
 static DEVICE_ATTR_RO(_name)