diff options
author | Himanshu Jha <himanshujha199640@gmail.com> | 2017-10-09 03:00:28 +0530 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-10-09 08:31:27 -0600 |
commit | 09aa97c78a784df2f781ff03b57b7dd6f1339edc (patch) | |
tree | 8d29be61837598c05345a2174d9f3b6583b49912 /drivers/block | |
parent | 17d084c8d1b73fc07e48c1f5081ef3b8af338e15 (diff) |
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 <himanshujha199640@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/skd_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |