devfreq: imx-bus: Use of_property_present()
Subsystems (2)
PATCH 1/1 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.
--- drivers/devfreq/imx-bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/devfreq/imx-bus.c +1 -1
@@ -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" );
Signature · 1 line
2.43.0
Quoted 9 lines
Subject: [PATCH] devfreq: imx-bus: Use
of_property_present()Use
of_property_present()to test for property presence rather thanof_get_property(). This is part of a larger effort to remove callers ofof_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.Signed-off-by Rob Herring (Arm) <[email protected]>
Quoted 11 lines · Rob Herring (Arm)
Use
of_property_present()to test for property presence rather thanof_get_property(). This is part of a larger effort to remove callers ofof_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.Signed-off-by Rob Herring (Arm) <[email protected]>--- drivers/devfreq/imx-bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Ping!
Quoted 17 lines
drivers/devfreq/imx-bus.c +1
-2@@ -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" ); --2.43.0
24. 8. 1. 04:12에 Rob Herring (Arm) 이(가) 쓴 글:
Quoted 16 lines
Use
of_property_present()to test for property presence rather thanof_get_property(). This is part of a larger effort to remove callers ofof_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.Signed-off-by Rob Herring (Arm) <[email protected]>--- drivers/devfreq/imx-bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/devfreq/imx-bus.c +0
-0
drivers/devfreq/imx-bus.c static int imx_bus_init_icc(struct device *dev) · line 65
Quoted 8 lines
drivers/devfreq/imx-bus.c +1
-1@@ -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" );
I'm sorry for late reply.
Applied it.
Signature · 3 lines
Best Regards, Samsung Electronics Chanwoo Choi