Commit d4755212 authored by Rob Herring (Arm)'s avatar Rob Herring (Arm) Committed by Chanwoo Choi

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: default avatarPeng Fan <peng.fan@nxp.com>
Signed-off-by: default avatarRob Herring (Arm) <robh@kernel.org>
Signed-off-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
parent 629277b7
......@@ -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");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment