summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/samsung
diff options
context:
space:
mode:
authorRob Herring (Arm) <robh@kernel.org>2024-07-31 22:12:54 +0300
committerKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>2024-08-04 12:09:06 +0300
commitaa85d45338692e8b29b0c023826c404c3e7113a6 (patch)
tree855ce2d88414efca95570d96730364fbed376e4c /drivers/pinctrl/samsung
parent8400291e289ee6b2bf9779ff1c83a291501f017b (diff)
downloadlinux-aa85d45338692e8b29b0c023826c404c3e7113a6.tar.xz
pinctrl: samsung: Use of_property_present()
Use of_property_present() to test for property presence rather than of_find_property(). This is part of a larger effort to remove callers of of_find_property() and similar functions. of_find_property() leaks 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> Link: https://lore.kernel.org/r/20240731191312.1710417-16-robh@kernel.org Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Diffstat (limited to 'drivers/pinctrl/samsung')
-rw-r--r--drivers/pinctrl/samsung/pinctrl-samsung.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/pinctrl/samsung/pinctrl-samsung.c b/drivers/pinctrl/samsung/pinctrl-samsung.c
index 623df65a5d6f..855d6d99a253 100644
--- a/drivers/pinctrl/samsung/pinctrl-samsung.c
+++ b/drivers/pinctrl/samsung/pinctrl-samsung.c
@@ -823,16 +823,16 @@ static struct samsung_pmx_func *samsung_pinctrl_create_functions(
struct device_node *func_np;
if (!of_get_child_count(cfg_np)) {
- if (!of_find_property(cfg_np,
- "samsung,pin-function", NULL))
+ if (!of_property_present(cfg_np,
+ "samsung,pin-function"))
continue;
++func_cnt;
continue;
}
for_each_child_of_node(cfg_np, func_np) {
- if (!of_find_property(func_np,
- "samsung,pin-function", NULL))
+ if (!of_property_present(func_np,
+ "samsung,pin-function"))
continue;
++func_cnt;
}