cpufreq: armada-37xx: stop using 0 as NULL pointer
Subsystems (3)
PATCH 1/1 cpufreq: armada-37xx: stop using 0 as NULL pointer
Use NULL for NULL pointer to fix the following sparse warning:drivers/cpufreq/armada-37xx-cpufreq.c:448:32: sparse: warning: Using plain integer as NULL pointer
Signed-off-by Miles Chen <[email protected]>
--- drivers/cpufreq/armada-37xx-cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cpufreq/armada-37xx-cpufreq.c +1 -1
@@ -445,7 +445,7 @@ static int __init armada37xx_cpufreq_driver_init(void)return -ENODEV ; } - clk =clk_get (cpu_dev,0 ); + clk =clk_get (cpu_dev,NULL );if (IS_ERR (clk)) {dev_err (cpu_dev,"Cannot get clock for CPU0\n" );return PTR_ERR (clk);
Signature · 1 line
2.18.0
Quoted 13 lines · Miles Chen
Use NULL for NULL pointer to fix the following sparse warning:
drivers/cpufreq/armada-37xx-cpufreq.c:448:32: sparse: warning: Using plain integer as NULL pointerSigned-off-by Miles Chen <[email protected]>--- drivers/cpufreq/armada-37xx-cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/cpufreq/armada-37xx-cpufreq.c +0
-0
drivers/cpufreq/armada-37xx-cpufreq.c static int __init armada37xx_cpufreq_driver_init(void) · line 451
Quoted 8 lines
drivers/cpufreq/armada-37xx-cpufreq.c +1
-1@@ -445,7 +445,7 @@ static int __init armada37xx_cpufreq_driver_init(void)return -ENODEV ; } - clk =clk_get (cpu_dev,0 ); + clk =clk_get (cpu_dev,NULL );if (IS_ERR (clk)) {dev_err (cpu_dev,"Cannot get clock for CPU0\n" );return PTR_ERR (clk);
Applied. Thanks.
Signature · 1 line
viresh