diff options
| author | Stephen Boyd <sboyd@codeaurora.org> | 2017-12-05 15:30:09 -0800 |
|---|---|---|
| committer | Stephen Boyd <sboyd@codeaurora.org> | 2017-12-05 15:30:09 -0800 |
| commit | 082ea2ef0349bfe7faa7789ef9bc604f40da7c5e (patch) | |
| tree | be5a439036e60b2b6a66620ba34c2e35d7a223d9 /drivers | |
| parent | 4fbd8d194f06c8a3fd2af1ce560ddb31f7ec8323 (diff) | |
| parent | 975b820b6836b6b6c42fb84cd2e772e2b41bca67 (diff) | |
Merge branch 'clk-fixes' into clk-next
* clk-fixes:
clk: fix a panic error caused by accessing NULL pointer
clk: Manage proper runtime PM state in clk_change_rate()
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/clk/clk.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 647d056df88c..8a1860a36c77 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -1564,6 +1564,9 @@ static void clk_change_rate(struct clk_core *core) best_parent_rate = core->parent->rate; } + if (clk_pm_runtime_get(core)) + return; + if (core->flags & CLK_SET_RATE_UNGATE) { unsigned long flags; @@ -1634,6 +1637,8 @@ static void clk_change_rate(struct clk_core *core) /* handle the new child who might not be in core->children yet */ if (core->new_child) clk_change_rate(core->new_child); + + clk_pm_runtime_put(core); } static int clk_core_set_rate_nolock(struct clk_core *core, |
