[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Mon, 1 Feb 2016 18:41:58 -0800
From: Stephen Boyd <sboyd@...eaurora.org>
To: Insu Yun <wuninsu@...il.com>
Cc: mturquette@...libre.com, linux-clk@...r.kernel.org,
linux-kernel@...r.kernel.org, taesoo@...ech.edu,
yeongjin.jang@...ech.edu, insu@...ech.edu, changwoo@...ech.edu
Subject: Re: [PATCH] clk: unlock for handling unregisterd clock
On 01/30, Insu Yun wrote:
> If clock is already unregistered, it returns with holding lock.
> It needs to be unlocked.
>
> Signed-off-by: Insu Yun <wuninsu@...il.com>
> ---
Applied to clk-next but I changed it to a goto:
---8<---
From: Insu Yun <wuninsu@...il.com>
Subject: [PATCH] clk: unlock for handling unregisterd clock
If clock is already unregistered, it returns with holding lock.
It needs to be unlocked.
Signed-off-by: Insu Yun <wuninsu@...il.com>
[sboyd@...eaurora.org: Use goto instead]
Signed-off-by: Stephen Boyd <sboyd@...eaurora.org>
---
drivers/clk/clk.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index fff87b39944f..7d247a26a212 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -2639,7 +2639,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
@@ -2665,7 +2665,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);
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
Powered by blists - more mailing lists