Browse Source

clk: ti: apll: not allocating enough data

There is a cut and paste bug here which will lead to memory corruption
because we don't allocate enough data.

Fixes: 4d008589e271 ('CLK: TI: APLL: add support for omap2 aplls')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Dan Carpenter 11 years ago
parent
commit
6c7ee8905d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/clk/ti/apll.c

+ 1 - 1
drivers/clk/ti/apll.c

@@ -338,7 +338,7 @@ static void __init of_omap2_apll_setup(struct device_node *node)
 	const char *parent_name;
 	const char *parent_name;
 	u32 val;
 	u32 val;
 
 
-	ad = kzalloc(sizeof(*clk_hw), GFP_KERNEL);
+	ad = kzalloc(sizeof(*ad), GFP_KERNEL);
 	clk_hw = kzalloc(sizeof(*clk_hw), GFP_KERNEL);
 	clk_hw = kzalloc(sizeof(*clk_hw), GFP_KERNEL);
 	init = kzalloc(sizeof(*init), GFP_KERNEL);
 	init = kzalloc(sizeof(*init), GFP_KERNEL);