aboutsummaryrefslogtreecommitdiff
path: root/drivers/cpufreq/sti-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/sti-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/sti-cpufreq.c')
-rw-r--r--drivers/cpufreq/sti-cpufreq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/cpufreq/sti-cpufreq.c b/drivers/cpufreq/sti-cpufreq.c
index 8e2e703c3865..b15b3142b5fe 100644
--- a/drivers/cpufreq/sti-cpufreq.c
+++ b/drivers/cpufreq/sti-cpufreq.c
@@ -267,7 +267,7 @@ static int __init sti_cpufreq_init(void)
goto skip_voltage_scaling;
}
- if (!of_get_property(ddata.cpu->of_node, "operating-points-v2", NULL)) {
+ if (!of_property_present(ddata.cpu->of_node, "operating-points-v2")) {
dev_err(ddata.cpu, "OPP-v2 not supported\n");
goto skip_voltage_scaling;
}