Skip to content

Commit

Permalink
clk: unlock for handling unregistered clock
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Insu Yun authored and Stephen Boyd committed Feb 2, 2016
1 parent 7001ec5 commit 4106a3d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/clk/clk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
Expand Down

0 comments on commit 4106a3d

Please sign in to comment.