nvdimm: change to use generic kvfree()
authoryalin wang <yalin.wang2010@gmail.com>
Thu, 27 Aug 2015 23:35:48 +0000 (19:35 -0400)
committerDan Williams <dan.j.williams@intel.com>
Thu, 27 Aug 2015 23:35:48 +0000 (19:35 -0400)
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>
drivers/nvdimm/dimm_devs.c

index c05eb80..651b8d1 100644 (file)
@@ -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);
 }