Commit 8e56133e authored by Alexandre Belloni's avatar Alexandre Belloni Committed by Stephen Boyd

clk: at91: fix clk-generated parenting

clk_generated_startup is called after clk_hw_register. So the first call to
get_parent will not have the correct value (i.e. 0) and because this is
cached, it may never be updated.
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
Fixes: df70aeef ("clk: at91: add generated clock driver")
Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
parent ad149724
......@@ -260,13 +260,12 @@ at91_clk_register_generated(struct regmap *regmap, spinlock_t *lock,
gck->lock = lock;
gck->range = *range;
clk_generated_startup(gck);
hw = &gck->hw;
ret = clk_hw_register(NULL, &gck->hw);
if (ret) {
kfree(gck);
hw = ERR_PTR(ret);
} else
clk_generated_startup(gck);
return hw;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment