diff options
Diffstat (limited to 'drivers/clk/clk.c')
-rw-r--r-- | drivers/clk/clk.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 43e2c3ad6c31..0ebcf449778a 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c | |||
@@ -2437,7 +2437,8 @@ static int __clk_init(struct device *dev, struct clk *clk_user) | |||
2437 | hlist_for_each_entry_safe(orphan, tmp2, &clk_orphan_list, child_node) { | 2437 | hlist_for_each_entry_safe(orphan, tmp2, &clk_orphan_list, child_node) { |
2438 | if (orphan->num_parents && orphan->ops->get_parent) { | 2438 | if (orphan->num_parents && orphan->ops->get_parent) { |
2439 | i = orphan->ops->get_parent(orphan->hw); | 2439 | i = orphan->ops->get_parent(orphan->hw); |
2440 | if (!strcmp(core->name, orphan->parent_names[i])) | 2440 | if (i >= 0 && i < orphan->num_parents && |
2441 | !strcmp(core->name, orphan->parent_names[i])) | ||
2441 | clk_core_reparent(orphan, core); | 2442 | clk_core_reparent(orphan, core); |
2442 | continue; | 2443 | continue; |
2443 | } | 2444 | } |