Merge tag 'v5.3-rockchip-soc32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/soc
Another missing of_node_put * tag 'v5.3-rockchip-soc32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: ARM: rockchip: fix missing of_node_put calls in smp code Signed-off-by: Olof Johansson <olof@lixom.net>
This commit is contained in:
@ -269,19 +269,25 @@ static void __init rockchip_smp_prepare_cpus(unsigned int max_cpus)
|
|||||||
sram_base_addr = of_iomap(node, 0);
|
sram_base_addr = of_iomap(node, 0);
|
||||||
if (!sram_base_addr) {
|
if (!sram_base_addr) {
|
||||||
pr_err("%s: could not map sram registers\n", __func__);
|
pr_err("%s: could not map sram registers\n", __func__);
|
||||||
|
of_node_put(node);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (has_pmu && rockchip_smp_prepare_pmu())
|
if (has_pmu && rockchip_smp_prepare_pmu()) {
|
||||||
|
of_node_put(node);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (read_cpuid_part() == ARM_CPU_PART_CORTEX_A9) {
|
if (read_cpuid_part() == ARM_CPU_PART_CORTEX_A9) {
|
||||||
if (rockchip_smp_prepare_sram(node))
|
if (rockchip_smp_prepare_sram(node)) {
|
||||||
|
of_node_put(node);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* enable the SCU power domain */
|
/* enable the SCU power domain */
|
||||||
pmu_set_power_domain(PMU_PWRDN_SCU, true);
|
pmu_set_power_domain(PMU_PWRDN_SCU, true);
|
||||||
|
|
||||||
|
of_node_put(node);
|
||||||
node = of_find_compatible_node(NULL, NULL, "arm,cortex-a9-scu");
|
node = of_find_compatible_node(NULL, NULL, "arm,cortex-a9-scu");
|
||||||
if (!node) {
|
if (!node) {
|
||||||
pr_err("%s: missing scu\n", __func__);
|
pr_err("%s: missing scu\n", __func__);
|
||||||
@ -291,6 +297,7 @@ static void __init rockchip_smp_prepare_cpus(unsigned int max_cpus)
|
|||||||
scu_base_addr = of_iomap(node, 0);
|
scu_base_addr = of_iomap(node, 0);
|
||||||
if (!scu_base_addr) {
|
if (!scu_base_addr) {
|
||||||
pr_err("%s: could not map scu registers\n", __func__);
|
pr_err("%s: could not map scu registers\n", __func__);
|
||||||
|
of_node_put(node);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -309,6 +316,7 @@ static void __init rockchip_smp_prepare_cpus(unsigned int max_cpus)
|
|||||||
asm ("mrc p15, 1, %0, c9, c0, 2\n" : "=r" (l2ctlr));
|
asm ("mrc p15, 1, %0, c9, c0, 2\n" : "=r" (l2ctlr));
|
||||||
ncores = ((l2ctlr >> 24) & 0x3) + 1;
|
ncores = ((l2ctlr >> 24) & 0x3) + 1;
|
||||||
}
|
}
|
||||||
|
of_node_put(node);
|
||||||
|
|
||||||
/* Make sure that all cores except the first are really off */
|
/* Make sure that all cores except the first are really off */
|
||||||
for (i = 1; i < ncores; i++)
|
for (i = 1; i < ncores; i++)
|
||||||
|
@ -257,12 +257,14 @@ static int __init rk3288_suspend_init(struct device_node *np)
|
|||||||
rk3288_bootram_base = of_iomap(sram_np, 0);
|
rk3288_bootram_base = of_iomap(sram_np, 0);
|
||||||
if (!rk3288_bootram_base) {
|
if (!rk3288_bootram_base) {
|
||||||
pr_err("%s: could not map bootram base\n", __func__);
|
pr_err("%s: could not map bootram base\n", __func__);
|
||||||
|
of_node_put(sram_np);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = of_address_to_resource(sram_np, 0, &res);
|
ret = of_address_to_resource(sram_np, 0, &res);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
pr_err("%s: could not get bootram phy addr\n", __func__);
|
pr_err("%s: could not get bootram phy addr\n", __func__);
|
||||||
|
of_node_put(sram_np);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
rk3288_bootram_phy = res.start;
|
rk3288_bootram_phy = res.start;
|
||||||
|
Reference in New Issue
Block a user