Skip to content

Commit 09aa97c

Browse files
himanshujha199640axboe
authored andcommitted
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 <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 17d084c commit 09aa97c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/block/skd_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2604,7 +2604,7 @@ static void *skd_alloc_dma(struct skd_device *skdev, struct kmem_cache *s,
26042604
return NULL;
26052605
*dma_handle = dma_map_single(dev, buf, s->size, dir);
26062606
if (dma_mapping_error(dev, *dma_handle)) {
2607-
kfree(buf);
2607+
kmem_cache_free(s, buf);
26082608
buf = NULL;
26092609
}
26102610
return buf;

0 commit comments

Comments
 (0)