diff options
Diffstat (limited to 'drivers/clk/clk.c')
-rw-r--r-- | drivers/clk/clk.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 5da068e435d1..459a96f3043e 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -2449,11 +2449,17 @@ static int __clk_core_init(struct clk_core *core) if (core->flags & CLK_IS_CRITICAL) { unsigned long flags; - clk_core_prepare(core); + ret = clk_core_prepare(core); + if (ret) + goto out; flags = clk_enable_lock(); - clk_core_enable(core); + ret = clk_core_enable(core); clk_enable_unlock(flags); + if (ret) { + clk_core_unprepare(core); + goto out; + } } /* |