diff mbox series

cpufreq: armada-37xx: stop using 0 as NULL pointer

Message ID 20230110031252.5014-1-miles.chen@mediatek.com
State Accepted
Commit 08f0adb193c008de640fde34a2e00a666c01d77c
Headers show
Series cpufreq: armada-37xx: stop using 0 as NULL pointer | expand

Commit Message

Miles Chen Jan. 10, 2023, 3:12 a.m. UTC
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 <miles.chen@mediatek.com>
---
 drivers/cpufreq/armada-37xx-cpufreq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Viresh Kumar Jan. 10, 2023, 4:02 a.m. UTC | #1
On 10-01-23, 11:12, Miles Chen wrote:
> 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 <miles.chen@mediatek.com>
> ---
>  drivers/cpufreq/armada-37xx-cpufreq.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/cpufreq/armada-37xx-cpufreq.c b/drivers/cpufreq/armada-37xx-cpufreq.c
> index c10fc33b29b1..b74289a95a17 100644
> --- a/drivers/cpufreq/armada-37xx-cpufreq.c
> +++ b/drivers/cpufreq/armada-37xx-cpufreq.c
> @@ -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.
diff mbox series

Patch

diff --git a/drivers/cpufreq/armada-37xx-cpufreq.c b/drivers/cpufreq/armada-37xx-cpufreq.c
index c10fc33b29b1..b74289a95a17 100644
--- a/drivers/cpufreq/armada-37xx-cpufreq.c
+++ b/drivers/cpufreq/armada-37xx-cpufreq.c
@@ -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);