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 c05eb807d674dcc0243765a96cb4544c8b8f9a39..651b8d19d324f3814fb4dc2e75bb8670ba07f9f7 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);
 }