mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-29 17:22:07 +00:00
ARM: imx: Add missing of_node_put()
After finishing using device node got from of_find_compatible_node(), of_node_put() needs to be called. Signed-off-by: Anson Huang <Anson.Huang@nxp.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
This commit is contained in:
parent
cc56f77e52
commit
4a4fb66119
@ -94,7 +94,7 @@ void imx_anatop_post_resume(void)
|
||||
|
||||
void __init imx_init_revision_from_anatop(void)
|
||||
{
|
||||
struct device_node *np;
|
||||
struct device_node *np, *src_np;
|
||||
void __iomem *anatop_base;
|
||||
unsigned int revision;
|
||||
u32 digprog;
|
||||
@ -135,9 +135,10 @@ void __init imx_init_revision_from_anatop(void)
|
||||
void __iomem *src_base;
|
||||
u32 sbmr2;
|
||||
|
||||
np = of_find_compatible_node(NULL, NULL,
|
||||
src_np = of_find_compatible_node(NULL, NULL,
|
||||
"fsl,imx6ul-src");
|
||||
src_base = of_iomap(np, 0);
|
||||
of_node_put(src_np);
|
||||
WARN_ON(!src_base);
|
||||
sbmr2 = readl_relaxed(src_base + SRC_SBMR2);
|
||||
iounmap(src_base);
|
||||
@ -149,6 +150,7 @@ void __init imx_init_revision_from_anatop(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
of_node_put(np);
|
||||
|
||||
mxc_set_cpu_type(digprog >> 16 & 0xff);
|
||||
imx_set_soc_revision(revision);
|
||||
|
@ -282,4 +282,5 @@ void __init imx_gpc_check_dt(void)
|
||||
/* map GPC, so that at least CPUidle and WARs keep working */
|
||||
gpc_base = of_iomap(np, 0);
|
||||
}
|
||||
of_node_put(np);
|
||||
}
|
||||
|
@ -109,6 +109,7 @@ static void __init ls1021a_smp_prepare_cpus(unsigned int max_cpus)
|
||||
|
||||
np = of_find_compatible_node(NULL, NULL, "fsl,ls1021a-dcfg");
|
||||
dcfg_base = of_iomap(np, 0);
|
||||
of_node_put(np);
|
||||
BUG_ON(!dcfg_base);
|
||||
|
||||
paddr = __pa_symbol(secondary_startup);
|
||||
|
@ -655,6 +655,8 @@ void __init imx6_pm_ccm_init(const char *ccm_compat)
|
||||
|
||||
if (of_property_read_bool(np, "fsl,pmic-stby-poweroff"))
|
||||
imx6_pm_stby_poweroff_probe();
|
||||
|
||||
of_node_put(np);
|
||||
}
|
||||
|
||||
void __init imx6q_pm_init(void)
|
||||
|
@ -62,6 +62,7 @@ void __init imx7ulp_pm_init(void)
|
||||
|
||||
np = of_find_compatible_node(NULL, NULL, "fsl,imx7ulp-smc1");
|
||||
smc1_base = of_iomap(np, 0);
|
||||
of_node_put(np);
|
||||
WARN_ON(!smc1_base);
|
||||
|
||||
imx7ulp_set_lpm(ULP_PM_RUN);
|
||||
|
Loading…
Reference in New Issue
Block a user