From a06a7576526e10a99ea7721533e7f2df3e26baad Mon Sep 17 00:00:00 2001 From: yalin wang Date: Thu, 27 Aug 2015 19:35:48 -0400 Subject: [PATCH] nvdimm: change to use generic kvfree() Signed-off-by: yalin wang Reviewed-by: Ross Zwisler Signed-off-by: Dan Williams --- drivers/nvdimm/dimm_devs.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/nvdimm/dimm_devs.c b/drivers/nvdimm/dimm_devs.c index c05eb807d674..651b8d19d324 100644 --- a/drivers/nvdimm/dimm_devs.c +++ b/drivers/nvdimm/dimm_devs.c @@ -241,10 +241,7 @@ void nvdimm_drvdata_release(struct kref *kref) nvdimm_free_dpa(ndd, res); nvdimm_bus_unlock(dev); - if (ndd->data && is_vmalloc_addr(ndd->data)) - vfree(ndd->data); - else - kfree(ndd->data); + kvfree(ndd->data); kfree(ndd); put_device(dev); } -- 2.20.1