From: Himanshu Jha Date: Sun, 8 Oct 2017 21:30:28 +0000 (+0530) Subject: skd: Use kmem_cache_free X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=09aa97c78a784df2f781ff03b57b7dd6f1339edc;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git skd: Use kmem_cache_free Use kmem_cache_free instead of kfree for freeing the memory previously allocated with kmem_cache_zalloc/kmem_cache_alloc/kmem_cache_node. Signed-off-by: Himanshu Jha Signed-off-by: Jens Axboe --- diff --git a/drivers/block/skd_main.c b/drivers/block/skd_main.c index 7cedb4295e9d..64d0fc17c174 100644 --- a/drivers/block/skd_main.c +++ b/drivers/block/skd_main.c @@ -2604,7 +2604,7 @@ static void *skd_alloc_dma(struct skd_device *skdev, struct kmem_cache *s, return NULL; *dma_handle = dma_map_single(dev, buf, s->size, dir); if (dma_mapping_error(dev, *dma_handle)) { - kfree(buf); + kmem_cache_free(s, buf); buf = NULL; } return buf;