hwmon: vexpress: Use of_property_present()
Subsystems (2)
PATCH 1/1 hwmon: vexpress: Use of_property_present()
Use of_property_present() to test for property presence rather than of_get_property(). This is part of a larger effort to remove callers of of_get_property() and similar functions. of_get_property() leaks the DT property data pointer which is a problem for dynamically allocated nodes which may be freed.
--- drivers/hwmon/vexpress-hwmon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hwmon/vexpress-hwmon.c +1 -1
@@ -72,7 +72,7 @@ static umode_t vexpress_hwmon_attr_is_visible(struct kobject *kobj, struct device_attribute, attr);if (dev_attr->show == vexpress_hwmon_label_show && - !of_get_property (dev->of_node,"label" ,NULL )) + !of_property_present (dev->of_node,"label" ))return 0 ;return attr->mode;
Signature · 1 line
2.43.0
Quoted 6 lines · Rob Herring (Arm)
Use
of_property_present()to test for property presence rather thanof_get_property(). This is part of a larger effort to remove callers ofof_get_property()and similar functions.of_get_property()leaks the DT property data pointer which is a problem for dynamically allocated nodes which may be freed.
Guenter,
I assume you will pick this up.
Signature · 2 lines
Regards, Sudeep
Quoted 8 lines · Rob Herring (Arm)
Use
of_property_present()to test for property presence rather thanof_get_property(). This is part of a larger effort to remove callers ofof_get_property()and similar functions.of_get_property()leaks the DT property data pointer which is a problem for dynamically allocated nodes which may be freed.Signed-off-by Rob Herring (Arm) <[email protected]>Reviewed-by Sudeep Holla <[email protected]>
Applied.
Thanks,
Guenter