]> git.ipfire.org Git - thirdparty/linux.git/commit
nvdimm: Use of_property_present() and of_property_read_bool()
authorRob Herring (Arm) <robh@kernel.org>
Wed, 31 Jul 2024 19:13:04 +0000 (13:13 -0600)
committerIra Weiny <ira.weiny@intel.com>
Wed, 21 Aug 2024 21:06:43 +0000 (16:06 -0500)
commit795191854a8ff04a195c1cab856a61bd5677dda9
treeb081531c2581579ad55d20d3d83525711152d07c
parent47ac09b91befbb6a235ab620c32af719f8208399
nvdimm: Use of_property_present() and of_property_read_bool()

Use of_property_present() and of_property_read_bool() to test
property presence and read boolean properties rather than
of_(find|get)_property(). This is part of a larger effort to remove
callers of of_find_property() and similar functions.
of_(find|get)_property() leak the DT struct property and data pointers
which is a problem for dynamically allocated nodes which may be freed.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Link: https://patch.msgid.link/20240731191312.1710417-26-robh@kernel.org
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
drivers/nvdimm/of_pmem.c
drivers/nvmem/layouts.c