summaryrefslogtreecommitdiff
path: root/drivers/cpufreq/pmac64-cpufreq.c
diff options
context:
space:
mode:
authorRob Herring (Arm) <robh@kernel.org>2024-07-31 13:12:40 -0600
committerViresh Kumar <viresh.kumar@linaro.org>2024-08-07 12:11:45 +0530
commit872cc94c7e3d874373f56b035f998631c6b26d22 (patch)
tree56cf435fe3b4fb308a27b92e7464a27f932a8a6c /drivers/cpufreq/pmac64-cpufreq.c
parent8400291e289ee6b2bf9779ff1c83a291501f017b (diff)
cpufreq: Use of_property_present()
Use of_property_present() to test for property presence 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_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> Acked-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'drivers/cpufreq/pmac64-cpufreq.c')
-rw-r--r--drivers/cpufreq/pmac64-cpufreq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/cpufreq/pmac64-cpufreq.c b/drivers/cpufreq/pmac64-cpufreq.c
index 2cd2b06849a2..c87cd6e0b638 100644
--- a/drivers/cpufreq/pmac64-cpufreq.c
+++ b/drivers/cpufreq/pmac64-cpufreq.c
@@ -505,7 +505,7 @@ static int __init g5_pm72_cpufreq_init(struct device_node *cpunode)
continue;
if (strcmp(loc, "CPU CLOCK"))
continue;
- if (!of_get_property(hwclock, "platform-get-frequency", NULL))
+ if (!of_property_present(hwclock, "platform-get-frequency"))
continue;
break;
}