diff options
author | Himanshu Jha <himanshujha199640@gmail.com> | 2017-10-08 23:30:28 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-10-09 16:31:27 +0200 |
commit | 09aa97c78a784df2f781ff03b57b7dd6f1339edc (patch) | |
tree | 8d29be61837598c05345a2174d9f3b6583b49912 /drivers/block | |
parent | Merge branch 'for-linus' of git://git.kernel.dk/linux-block (diff) | |
download | linux-09aa97c78a784df2f781ff03b57b7dd6f1339edc.tar.xz linux-09aa97c78a784df2f781ff03b57b7dd6f1339edc.zip |
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; |