diff mbox

[05/10] clk: socfpga: Use NULL instead of 0

Message ID 1379064232-10261-5-git-send-email-sachin.kamat@linaro.org (mailing list archive)
State New, archived
Headers show

Commit Message

Sachin Kamat Sept. 13, 2013, 9:23 a.m. UTC
'div_reg' is a pointer. Assign NULL instead of 0.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Dinh Nguyen <dinguyen@altera.com>
---
 drivers/clk/socfpga/clk.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Dinh Nguyen Sept. 13, 2013, 10:03 p.m. UTC | #1
On Fri, 2013-09-13 at 14:53 +0530, Sachin Kamat wrote:
> 'div_reg' is a pointer. Assign NULL instead of 0.
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> Cc: Dinh Nguyen <dinguyen@altera.com>
> ---
>  drivers/clk/socfpga/clk.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/clk/socfpga/clk.c b/drivers/clk/socfpga/clk.c
> index 5bb848c..454ddc1 100644
> --- a/drivers/clk/socfpga/clk.c
> +++ b/drivers/clk/socfpga/clk.c
> @@ -292,7 +292,7 @@ static void __init socfpga_gate_clk_init(struct device_node *node,
>  		socfpga_clk->shift = div_reg[1];
>  		socfpga_clk->width = div_reg[2];
>  	} else {
> -		socfpga_clk->div_reg = 0;
> +		socfpga_clk->div_reg = NULL;
>  	}
>  
>  	of_property_read_string(node, "clock-output-names", &clk_name);

Acked-by: Dinh Nguyen <dinguyen@altera.com>
diff mbox

Patch

diff --git a/drivers/clk/socfpga/clk.c b/drivers/clk/socfpga/clk.c
index 5bb848c..454ddc1 100644
--- a/drivers/clk/socfpga/clk.c
+++ b/drivers/clk/socfpga/clk.c
@@ -292,7 +292,7 @@  static void __init socfpga_gate_clk_init(struct device_node *node,
 		socfpga_clk->shift = div_reg[1];
 		socfpga_clk->width = div_reg[2];
 	} else {
-		socfpga_clk->div_reg = 0;
+		socfpga_clk->div_reg = NULL;
 	}
 
 	of_property_read_string(node, "clock-output-names", &clk_name);