PM / devfreq: imx-bus: use NULL to pass a null pointer rather than zero
Subsystems (3)
PATCH 1/1 PM / devfreq: imx-bus: use NULL to pass a null pointer rather than zero
The 3rd argument to the function of_get_property is a pointer and it is being passed using 0. Use NULL instead.
Cleans up sparse warning:
warning: Using plain integer as NULL pointer
Signed-off-by Colin Ian King <[email protected]>
--- 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" ,0 )) +if (!of_get_property (dev->of_node,"#interconnect-cells" ,NULL ))return 0 ;if (!IS_ENABLED (CONFIG_INTERCONNECT_IMX )) {dev_warn (dev,"imx interconnect drivers disabled\n" );
Signature · 7 lines
2.35.3 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Chanwoo Choi
AppliedQuoted 16 lines · Colin Ian King
The 3rd argument to the function
of_get_propertyis a pointer and it is being passed using 0. Use NULL instead.Cleans up sparse warning:
warning: Using plain integer as NULL pointerSigned-off-by Colin Ian King <[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" ,0 )) +if (!of_get_property (dev->of_node,"#interconnect-cells" ,NULL ))return 0 ;if (!IS_ENABLED (CONFIG_INTERCONNECT_IMX )) {dev_warn (dev,"imx interconnect drivers disabled\n" );
Applied it. Thanks.
Signature · 3 lines
Best Regards, Samsung Electronics Chanwoo Choi