|
@@ -1235,8 +1235,8 @@ int __clk_init(struct device *dev, struct clk *clk)
|
|
|
* If clk->parents is not NULL we skip this entire block. This allows
|
|
|
* for clock drivers to statically initialize clk->parents.
|
|
|
*/
|
|
|
- if (clk->num_parents && !clk->parents) {
|
|
|
- clk->parents = kmalloc((sizeof(struct clk*) * clk->num_parents),
|
|
|
+ if (clk->num_parents > 1 && !clk->parents) {
|
|
|
+ clk->parents = kzalloc((sizeof(struct clk*) * clk->num_parents),
|
|
|
GFP_KERNEL);
|
|
|
/*
|
|
|
* __clk_lookup returns NULL for parents that have not been
|