提交 2fee7d5b 编写于 作者: M Masahiro Yamada 提交者: Catalin Marinas

arm64: spin-table: add missing of_node_put()

Since of_get_cpu_node() increments refcount, the node should be put.
Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: NWill Deacon <will.deacon@arm.com>
Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
上级 adb49070
...@@ -52,6 +52,7 @@ static void write_pen_release(u64 val) ...@@ -52,6 +52,7 @@ static void write_pen_release(u64 val)
static int smp_spin_table_cpu_init(unsigned int cpu) static int smp_spin_table_cpu_init(unsigned int cpu)
{ {
struct device_node *dn; struct device_node *dn;
int ret;
dn = of_get_cpu_node(cpu, NULL); dn = of_get_cpu_node(cpu, NULL);
if (!dn) if (!dn)
...@@ -60,15 +61,15 @@ static int smp_spin_table_cpu_init(unsigned int cpu) ...@@ -60,15 +61,15 @@ static int smp_spin_table_cpu_init(unsigned int cpu)
/* /*
* Determine the address from which the CPU is polling. * Determine the address from which the CPU is polling.
*/ */
if (of_property_read_u64(dn, "cpu-release-addr", ret = of_property_read_u64(dn, "cpu-release-addr",
&cpu_release_addr[cpu])) { &cpu_release_addr[cpu]);
if (ret)
pr_err("CPU %d: missing or invalid cpu-release-addr property\n", pr_err("CPU %d: missing or invalid cpu-release-addr property\n",
cpu); cpu);
return -1; of_node_put(dn);
}
return 0; return ret;
} }
static int smp_spin_table_cpu_prepare(unsigned int cpu) static int smp_spin_table_cpu_prepare(unsigned int cpu)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册