summaryrefslogtreecommitdiffstats
path: root/drivers/devfreq
diff options
context:
space:
mode:
authorRob Herring (Arm) <robh@kernel.org>2024-07-31 21:12:49 +0200
committerChanwoo Choi <cw00.choi@samsung.com>2024-09-04 18:23:56 +0200
commitd47552124bb0b9527da7a95357ae7d2e6046c4f6 (patch)
tree31a19a8d25fb6f5780054d2db091d3c6be912d04 /drivers/devfreq
parentPM / devfreq: exynos: Use Use devm_clk_get_enabled() helpers (diff)
downloadlinux-d47552124bb0b9527da7a95357ae7d2e6046c4f6.tar.xz
linux-d47552124bb0b9527da7a95357ae7d2e6046c4f6.zip
PM / devfreq: imx-bus: 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. Link: https://lore.kernel.org/lkml/20240731191312.1710417-11-robh@kernel.org/ Acked-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Diffstat (limited to 'drivers/devfreq')
-rw-r--r--drivers/devfreq/imx-bus.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/devfreq/imx-bus.c b/drivers/devfreq/imx-bus.c
index 86850b7dea09..49798f542d68 100644
--- a/drivers/devfreq/imx-bus.c
+++ b/drivers/devfreq/imx-bus.c
@@ -59,7 +59,7 @@ static int imx_bus_init_icc(struct device *dev)
struct imx_bus *priv = dev_get_drvdata(dev);
const char *icc_driver_name;
- if (!of_get_property(dev->of_node, "#interconnect-cells", NULL))
+ if (!of_property_present(dev->of_node, "#interconnect-cells"))
return 0;
if (!IS_ENABLED(CONFIG_INTERCONNECT_IMX)) {
dev_warn(dev, "imx interconnect drivers disabled\n");