projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4a33691
)
arch_topology: Fix putting invalid cpu clk
author
Jeffy Chen
<jeffy.chen@rock-chips.com>
Tue, 17 Mar 2020 06:33:08 +0000
(14:33 +0800)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Wed, 18 Mar 2020 10:41:54 +0000
(11:41 +0100)
Add a sanity check before putting the cpu clk.
Fixes:
b8fe128dad8f
(“arch_topology: Adjust initial CPU capacities with current freq")
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Link:
https://lore.kernel.org/r/20200317063308.23209-1-jeffy.chen@rock-chips.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/arch_topology.c
patch
|
blob
|
history
diff --git
a/drivers/base/arch_topology.c
b/drivers/base/arch_topology.c
index
4cb1616
..
e5d691c
100644
(file)
--- a/
drivers/base/arch_topology.c
+++ b/
drivers/base/arch_topology.c
@@
-164,11
+164,11
@@
bool __init topology_parse_cpu_capacity(struct device_node *cpu_node, int cpu)
* frequency (by keeping the initial freq_factor value).
*/
cpu_clk = of_clk_get(cpu_node, 0);
- if (!PTR_ERR_OR_ZERO(cpu_clk))
+ if (!PTR_ERR_OR_ZERO(cpu_clk))
{
per_cpu(freq_factor, cpu) =
clk_get_rate(cpu_clk) / 1000;
-
- clk_put(cpu_clk);
+ clk_put(cpu_clk);
+ }
} else {
if (raw_capacity) {
pr_err("cpu_capacity: missing %pOF raw capacity\n",