diff options
Diffstat (limited to 'drivers/clk')
-rw-r--r-- | drivers/clk/clk.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 9a1eb0cfa95..46317cbc088 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c | |||
@@ -1235,8 +1235,8 @@ int __clk_init(struct device *dev, struct clk *clk) | |||
1235 | * If clk->parents is not NULL we skip this entire block. This allows | 1235 | * If clk->parents is not NULL we skip this entire block. This allows |
1236 | * for clock drivers to statically initialize clk->parents. | 1236 | * for clock drivers to statically initialize clk->parents. |
1237 | */ | 1237 | */ |
1238 | if (clk->num_parents && !clk->parents) { | 1238 | if (clk->num_parents > 1 && !clk->parents) { |
1239 | clk->parents = kmalloc((sizeof(struct clk*) * clk->num_parents), | 1239 | clk->parents = kzalloc((sizeof(struct clk*) * clk->num_parents), |
1240 | GFP_KERNEL); | 1240 | GFP_KERNEL); |
1241 | /* | 1241 | /* |
1242 | * __clk_lookup returns NULL for parents that have not been | 1242 | * __clk_lookup returns NULL for parents that have not been |