From: Stephen Boyd <sboyd@codeaurora.org>
To: Insu Yun <wuninsu@gmail.com>
Cc: mturquette@baylibre.com, linux-clk@vger.kernel.org,
linux-kernel@vger.kernel.org, taesoo@gatech.edu,
yeongjin.jang@gatech.edu, insu@gatech.edu, changwoo@gatech.edu
Subject: Re: [PATCH] clk: unlock for handling unregisterd clock
Date: Mon, 1 Feb 2016 18:41:58 -0800 [thread overview]
Message-ID: <20160202024158.GM4848@codeaurora.org> (raw)
In-Reply-To: <1454166724-17374-1-git-send-email-wuninsu@gmail.com>
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@gmail.com>
> ---
Applied to clk-next but I changed it to a goto:
---8<---
From: Insu Yun <wuninsu@gmail.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@gmail.com>
[sboyd@codeaurora.org: Use goto instead]
Signed-off-by: Stephen Boyd <sboyd@codeaurora.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
prev parent reply other threads:[~2016-02-02 2:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-30 15:12 [PATCH] clk: unlock for handling unregisterd clock Insu Yun
2016-02-02 2:41 ` Stephen Boyd [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160202024158.GM4848@codeaurora.org \
--to=sboyd@codeaurora.org \
--cc=changwoo@gatech.edu \
--cc=insu@gatech.edu \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=taesoo@gatech.edu \
--cc=wuninsu@gmail.com \
--cc=yeongjin.jang@gatech.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).