diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:35:38 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:35:38 +0000 |
commit | 4f8f1553146401921349e8e78962dff48cde846a (patch) | |
tree | bf5ef5abdf1ca1370eb3947d70a2c176b6b69edd /drivers/clk/clk.c | |
parent | Adding upstream version 6.8.9. (diff) | |
download | linux-4f8f1553146401921349e8e78962dff48cde846a.tar.xz linux-4f8f1553146401921349e8e78962dff48cde846a.zip |
Adding upstream version 6.8.11.upstream/6.8.11
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'drivers/clk/clk.c')
-rw-r--r-- | drivers/clk/clk.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index cf1fc0edfd..260e901d0b 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -4552,7 +4552,8 @@ void clk_unregister(struct clk *clk) if (ops == &clk_nodrv_ops) { pr_err("%s: unregistered clock: %s\n", __func__, clk->core->name); - goto unlock; + clk_prepare_unlock(); + return; } /* * Assign empty clock ops for consumers that might still hold @@ -4586,11 +4587,10 @@ void clk_unregister(struct clk *clk) if (clk->core->protect_count) pr_warn("%s: unregistering protected clock: %s\n", __func__, clk->core->name); + clk_prepare_unlock(); kref_put(&clk->core->ref, __clk_release); free_clk(clk); -unlock: - clk_prepare_unlock(); } EXPORT_SYMBOL_GPL(clk_unregister); @@ -4749,13 +4749,11 @@ void __clk_put(struct clk *clk) if (clk->min_rate > 0 || clk->max_rate < ULONG_MAX) clk_set_rate_range_nolock(clk, 0, ULONG_MAX); - owner = clk->core->owner; - kref_put(&clk->core->ref, __clk_release); - clk_prepare_unlock(); + owner = clk->core->owner; + kref_put(&clk->core->ref, __clk_release); module_put(owner); - free_clk(clk); } |