summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authoryalin wang <yalin.wang2010@gmail.com>2015-08-28 01:35:48 +0200
committerDan Williams <dan.j.williams@intel.com>2015-08-28 01:35:48 +0200
commita06a7576526e10a99ea7721533e7f2df3e26baad (patch)
tree4a98266a93b3e94100c7144e791b0a4a16ef00e8 /drivers
parentlibnvdimm, e820: make CONFIG_X86_PMEM_LEGACY a tristate option (diff)
downloadlinux-a06a7576526e10a99ea7721533e7f2df3e26baad.tar.xz
linux-a06a7576526e10a99ea7721533e7f2df3e26baad.zip
nvdimm: change to use generic kvfree()
Signed-off-by: yalin wang <yalin.wang2010@gmail.com> Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/nvdimm/dimm_devs.c5
1 files changed, 1 insertions, 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);
}