* [PATCH] clk: tegra: dfll: add missing rcu_read_unlock() for error path
@ 2015-09-16 6:14 Vince Hsu
2015-09-16 22:15 ` Stephen Boyd
0 siblings, 1 reply; 3+ messages in thread
From: Vince Hsu @ 2015-09-16 6:14 UTC (permalink / raw)
To: pdeschrijver, pgaikwad, mturquette, sboyd, swarren,
thierry.reding, gnurou
Cc: linux-clk, linux-tegra, linux-kernel, vinceh, Vince Hsu
From: Vince Hsu <vince.h@nvidia.com>
The commit e770940218028c6a5927fda45f2ca9db5d9b35e0 ("clk: tegra: dfll:
Properly protect OPP list") added the rcu_read_{lock,unlock} but missed
one in the error path. So add the missing one.
Signed-off-by: Vince Hsu <vince.h@nvidia.com>
---
Hi,
I noticed the missed unlock because we had a similar fix as the commit
e77094021 in ChromeOS[1].
[1] https://chromium-review.googlesource.com/#/c/223661/
drivers/clk/tegra/clk-dfll.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/clk/tegra/clk-dfll.c b/drivers/clk/tegra/clk-dfll.c
index 4adff56dd0ef..c4e3a52e225b 100644
--- a/drivers/clk/tegra/clk-dfll.c
+++ b/drivers/clk/tegra/clk-dfll.c
@@ -685,8 +685,10 @@ static int find_lut_index_for_rate(struct tegra_dfll *td, unsigned long rate)
rcu_read_lock();
opp = dev_pm_opp_find_freq_ceil(td->soc->dev, &rate);
- if (IS_ERR(opp))
+ if (IS_ERR(opp)) {
+ rcu_read_unlock();
return PTR_ERR(opp);
+ }
uv = dev_pm_opp_get_voltage(opp);
rcu_read_unlock();
--
2.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] clk: tegra: dfll: add missing rcu_read_unlock() for error path
2015-09-16 6:14 [PATCH] clk: tegra: dfll: add missing rcu_read_unlock() for error path Vince Hsu
@ 2015-09-16 22:15 ` Stephen Boyd
2015-09-17 1:17 ` Vince Hsu
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Boyd @ 2015-09-16 22:15 UTC (permalink / raw)
To: Vince Hsu
Cc: pdeschrijver, pgaikwad, mturquette, swarren, thierry.reding,
gnurou, linux-clk, linux-tegra, linux-kernel, Vince Hsu
On 09/16, Vince Hsu wrote:
> From: Vince Hsu <vince.h@nvidia.com>
>
> The commit e770940218028c6a5927fda45f2ca9db5d9b35e0 ("clk: tegra: dfll:
> Properly protect OPP list") added the rcu_read_{lock,unlock} but missed
> one in the error path. So add the missing one.
>
> Signed-off-by: Vince Hsu <vince.h@nvidia.com>
> ---
I think we'll just squash this into the original patch from
Thierry.
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] clk: tegra: dfll: add missing rcu_read_unlock() for error path
2015-09-16 22:15 ` Stephen Boyd
@ 2015-09-17 1:17 ` Vince Hsu
0 siblings, 0 replies; 3+ messages in thread
From: Vince Hsu @ 2015-09-17 1:17 UTC (permalink / raw)
To: Stephen Boyd
Cc: pdeschrijver, pgaikwad, mturquette, swarren, thierry.reding,
gnurou, linux-clk, linux-tegra, linux-kernel, Vince Hsu
On 09/17/2015 06:15 AM, Stephen Boyd wrote:
> On 09/16, Vince Hsu wrote:
>> From: Vince Hsu <vince.h@nvidia.com>
>>
>> The commit e770940218028c6a5927fda45f2ca9db5d9b35e0 ("clk: tegra: dfll:
>> Properly protect OPP list") added the rcu_read_{lock,unlock} but missed
>> one in the error path. So add the missing one.
>>
>> Signed-off-by: Vince Hsu <vince.h@nvidia.com>
>> ---
> I think we'll just squash this into the original patch from
> Thierry.
Sure. Thanks!
Vince
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-09-17 1:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-16 6:14 [PATCH] clk: tegra: dfll: add missing rcu_read_unlock() for error path Vince Hsu
2015-09-16 22:15 ` Stephen Boyd
2015-09-17 1:17 ` Vince Hsu
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).