mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-12-04 01:36:58 -05:00
xtensa: Fix refcount leak bug in time.c
commit a0117dc956429f2ede17b323046e1968d1849150 upstream. In calibrate_ccount(), of_find_compatible_node() will return a node pointer with refcount incremented. We should use of_node_put() when it is not used anymore. Cc: [email protected] Signed-off-by: Liang He <[email protected]> Message-Id: <[email protected]> Signed-off-by: Max Filippov <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
a52972ee70
commit
e5234a9d64
1 changed files with 1 additions and 0 deletions
|
|
@ -160,6 +160,7 @@ static void __init calibrate_ccount(void)
|
|||
cpu = of_find_compatible_node(NULL, NULL, "cdns,xtensa-cpu");
|
||||
if (cpu) {
|
||||
clk = of_clk_get(cpu, 0);
|
||||
of_node_put(cpu);
|
||||
if (!IS_ERR(clk)) {
|
||||
ccount_freq = clk_get_rate(clk);
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in a new issue