aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-sunxi/mc_smp.c5
-rw-r--r--arch/arm/mach-sunxi/platsmp.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/arch/arm/mach-sunxi/mc_smp.c b/arch/arm/mach-sunxi/mc_smp.c
index b4037b603897..239084cf8192 100644
--- a/arch/arm/mach-sunxi/mc_smp.c
+++ b/arch/arm/mach-sunxi/mc_smp.c
@@ -89,6 +89,7 @@ static bool sunxi_core_is_cortex_a15(unsigned int core, unsigned int cluster)
89{ 89{
90 struct device_node *node; 90 struct device_node *node;
91 int cpu = cluster * SUNXI_CPUS_PER_CLUSTER + core; 91 int cpu = cluster * SUNXI_CPUS_PER_CLUSTER + core;
92 bool is_compatible;
92 93
93 node = of_cpu_device_node_get(cpu); 94 node = of_cpu_device_node_get(cpu);
94 95
@@ -107,7 +108,9 @@ static bool sunxi_core_is_cortex_a15(unsigned int core, unsigned int cluster)
107 return false; 108 return false;
108 } 109 }
109 110
110 return of_device_is_compatible(node, "arm,cortex-a15"); 111 is_compatible = of_device_is_compatible(node, "arm,cortex-a15");
112 of_node_put(node);
113 return is_compatible;
111} 114}
112 115
113static int sunxi_cpu_power_switch_set(unsigned int cpu, unsigned int cluster, 116static int sunxi_cpu_power_switch_set(unsigned int cpu, unsigned int cluster,
diff --git a/arch/arm/mach-sunxi/platsmp.c b/arch/arm/mach-sunxi/platsmp.c
index 8fb5088464db..e4c28ac44b25 100644
--- a/arch/arm/mach-sunxi/platsmp.c
+++ b/arch/arm/mach-sunxi/platsmp.c
@@ -133,6 +133,7 @@ static void __init sun8i_smp_prepare_cpus(unsigned int max_cpus)
133 } 133 }
134 134
135 prcm_membase = of_iomap(node, 0); 135 prcm_membase = of_iomap(node, 0);
136 of_node_put(node);
136 if (!prcm_membase) { 137 if (!prcm_membase) {
137 pr_err("Couldn't map A23 PRCM registers\n"); 138 pr_err("Couldn't map A23 PRCM registers\n");
138 return; 139 return;
@@ -146,6 +147,7 @@ static void __init sun8i_smp_prepare_cpus(unsigned int max_cpus)
146 } 147 }
147 148
148 cpucfg_membase = of_iomap(node, 0); 149 cpucfg_membase = of_iomap(node, 0);
150 of_node_put(node);
149 if (!cpucfg_membase) 151 if (!cpucfg_membase)
150 pr_err("Couldn't map A23 CPU config registers\n"); 152 pr_err("Couldn't map A23 CPU config registers\n");
151 153