[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1507498228-11878-1-git-send-email-himanshujha199640@gmail.com>
Date: Mon, 9 Oct 2017 03:00:28 +0530
From: Himanshu Jha <himanshujha199640@...il.com>
To: bart.vanassche@....com
Cc: linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
Himanshu Jha <himanshujha199640@...il.com>
Subject: [PATCH] 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@...il.com>
---
drivers/block/skd_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/block/skd_main.c b/drivers/block/skd_main.c
index 7cedb42..64d0fc1 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;
--
2.7.4
Powered by blists - more mailing lists