summaryrefslogtreecommitdiff
path: root/drivers/clk/clk.c
diff options
context:
space:
mode:
authorInsu Yun <wuninsu@gmail.com>2016-01-30 18:12:04 +0300
committerStephen Boyd <sboyd@codeaurora.org>2016-02-02 22:54:07 +0300
commit4106a3d9ebb9839a8e93b0116c0f94dc4f10e4b2 (patch)
tree12e9ecd8a2ddd632d691a28ee55a23f0324f2da7 /drivers/clk/clk.c
parent7001ec560a82d1cc2ba5c0c9ac1f7fcca820b27e (diff)
downloadlinux-4106a3d9ebb9839a8e93b0116c0f94dc4f10e4b2.tar.xz
clk: unlock for handling unregistered clock
If clock is already unregistered, it returns with holding lock. It needs to be unlocked. Signed-off-by: Insu Yun <wuninsu@gmail.com> [sboyd@codeaurora.org: Use goto instead] Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/clk/clk.c')
-rw-r--r--drivers/clk/clk.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index d31ed95d27a4..bb01ed6cc63e 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -2641,7 +2641,7 @@ void clk_unregister(struct clk *clk)
if (clk->core->ops == &clk_nodrv_ops) {
pr_err("%s: unregistered clock: %s\n", __func__,
clk->core->name);
- return;
+ goto unlock;
}
/*
* Assign empty clock ops for consumers that might still hold
@@ -2667,7 +2667,7 @@ void clk_unregister(struct clk *clk)
pr_warn("%s: unregistering prepared clock: %s\n",
__func__, clk->core->name);
kref_put(&clk->core->ref, __clk_release);
-
+unlock:
clk_prepare_unlock();
}
EXPORT_SYMBOL_GPL(clk_unregister);