Skip to content

Commit d475521

Browse files
robherringchanwoochoi
authored andcommitted
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/[email protected]/ Acked-by: Peng Fan <[email protected]> Signed-off-by: Rob Herring (Arm) <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]>
1 parent 629277b commit d475521

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/devfreq/imx-bus.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ static int imx_bus_init_icc(struct device *dev)
5959
struct imx_bus *priv = dev_get_drvdata(dev);
6060
const char *icc_driver_name;
6161

62-
if (!of_get_property(dev->of_node, "#interconnect-cells", NULL))
62+
if (!of_property_present(dev->of_node, "#interconnect-cells"))
6363
return 0;
6464
if (!IS_ENABLED(CONFIG_INTERCONNECT_IMX)) {
6565
dev_warn(dev, "imx interconnect drivers disabled\n");

0 commit comments

Comments
 (0)